On Sat Dec 12 04:43:09 2009, GBARR wrote:
Show quoted text> Fixed in TimeDate-1.20 just uploaded to CPAN. Allow a while for it to
> propagate to CPAN
> mirrors
thanks for your quick response :-)
but i have to annoy you again, sorry. :-P
there are more errors now, or i missunderstand something.
example:
perl -e 'use Date::Format;
my $time = time(); time for a wintertime
#my $time = 1276883000; # this is a summertime
my @lt = localtime($time);
print "time = ".$time."\n";
print "strftime(default time zone) = ".strftime("%s", @lt)."\n";
print "strftime(CET time zone) = ".strftime("%s", @lt, "CET")."\n";
print "strftime(CEST time zone) = ".strftime("%s", @lt, "CEST")."\n";
print "strftime(AWST time zone) = ".strftime("%s", @lt, "AWST")."\n";
print "strftime(UTC time zone) = ".strftime("%s", @lt, "UTC")."\n";
print "strftime(GMT time zone) = ".strftime("%s", @lt, "GMT")."\n";
print "strftime(+0100 time zone) = ".strftime("%s", @lt, "+0100")."\n";
print "strftime(+0200 time zone) = ".strftime("%s", @lt, "+0200")."\n";
print "strftime(abcdef time zone) = ".strftime("%s", @lt, "abcdef")."\n";
print "time2str(default time zone) = ".time2str("%s", $time)."\n";
print "time2str(CET time zone) = ".time2str("%s", $time, "CET")."\n";
print "time2str(CEST time zone) = ".time2str("%s", $time, "CEST")."\n";
print "time2str(AWST time zone) = ".time2str("%s", $time, "AWST")."\n";
print "time2str(UTC time zone) = ".time2str("%s", $time, "UTC")."\n";
print "time2str(GMT time zone) = ".time2str("%s", $time, "GMT")."\n";
print "time2str(+0100 time zone) = ".time2str("%s", $time, "+0100")."\n";
print "time2str(+0200 time zone) = ".time2str("%s", $time, "+0200")."\n";
print "time2str(abcdef time zone) = ".time2str("%s", $time,
"abcdef")."\n";'
my current time zone is CET
result:
time = 1260789389 current utc
strftime(default time zone) = 1260789389 should be +3600
strftime(CET time zone) = 1260792989 correct
strftime(CEST time zone) = 1260792989 shouldn't be +3600
strftime(AWST time zone) = 1260792989 shouldn't be +3600
strftime(UTC time zone) = 1260792989 shouldn't be +3600
strftime(GMT time zone) = 1260792989 shouldn't be +3600
strftime(+0100 time zone) = 1260792989 correct
strftime(+0200 time zone) = 1260792989 shouldn't be +3600
strftime(abcdef time zone) = 1260792989 maybe correct, if you use
default time zone
time2str(default time zone) = 1260789389 should be +3600
time2str(CET time zone) = 1260789389 should be +3600
time2str(CEST time zone) = 1260789389 shouldn't be utc
time2str(AWST time zone) = 1260789389 shouldn't be utc
time2str(UTC time zone) = 1260789389 correct
time2str(GMT time zone) = 1260789389 correct
time2str(+0100 time zone) = 1260789389 shouldn't be utc
time2str(+0200 time zone) = 1260789389 shouldn't be utc
time2str(abcdef time zone) = 1260789389 shouldn't be utc
if you use "my $time = 1276883000; # this is a summertime"
time = 1278783000
strftime(default time zone) = 1278783000
strftime(CET time zone) = 1278790200
strftime(CEST time zone) = 1278790200
strftime(AWST time zone) = 1278790200
strftime(UTC time zone) = 1278790200
strftime(GMT time zone) = 1278790200
strftime(+0100 time zone) = 1278790200
strftime(+0200 time zone) = 1278790200
strftime(abcdef time zone) = 1278790200
time2str(default time zone) = 1278783000
time2str(CET time zone) = 1278783000
time2str(CEST time zone) = 1278783000
time2str(AWST time zone) = 1278783000
time2str(UTC time zone) = 1278783000
time2str(GMT time zone) = 1278783000
time2str(+0100 time zone) = 1278783000
time2str(+0200 time zone) = 1278783000
time2str(abcdef time zone) = 1278783000
shouldn't be 'strftime("%s", @lt, "CET")', 'strftime("%s", @lt)',
'time2str("%s", $time, "CET")' and 'time2str("%s", $time)' the same if
my system time is 'CET'?
additionally, shouldn't the time value be +3600 in winter and time
value+7200 in summer?
shouldn't be the time zone overwritten, when you use other time zones?
thanks in advance