Changeset 1960

Show
Ignore:
Timestamp:
09/16/06 02:34:06
Author:
miyagawa
Message:

added DoW

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • misc/timezonecvt

    r1959 r1960  
    2727); 
    2828 
    29 my $from_date = $dt->ymd('/') . ' ' . $dt->hms(':'); 
    30 $dt->set_time_zone($to); 
    31 my $to_date   = $dt->ymd('/') . ' ' . $dt->hms(':'); 
     29my $to_date = $dt->clone; 
     30$to_date->set_time_zone($to); 
    3231 
    33 print <<EOF; 
    34 $from_date ($from) 
    35 $to_date ($to) 
    36 EOF 
     32for my $date ($dt, $to_date) { 
     33    print $date->strftime("%Y/%m/%d (%a) %H:%M:%S "), $date->time_zone->name, ($date->is_dst ? '*' : ''), "\n"; 
     34
    3735 
    3836__END__ 
  • misc/worlddate

    r1959 r1960  
    2929for my $tz (@tz) { 
    3030    $dt->set_time_zone($tz); 
    31     print $dt->ymd('/'), ' ', $dt->hms(':'), " ", $tz, ($dt->is_dst ? '*' : ''), "\n"; 
     31    print $dt->strftime("%Y/%m/%d (%a) %H:%M:%S "), $dt->time_zone->name, ($dt->is_dst ? '*' : ''), "\n"; 
    3232}