loge.hixie.ch

Hixie's Natural Log

2002-09-07 08:33 UTC Time zones in Web logs (+2 hours)

Someone pointed out that the times next to the entries here were wrong, by an hour.

It turns out the error is caused by a bug POSIX::strftime(). To quote from one of my tests:

use POSIX qw(strftime);
my $a = time;
my $b = gmtime($a);
my $c = strftime("%c", gmtime($a));
print "$b\n$c\n";

The output? A little worrying:

Sat Sep  7 08:17:14 2002
Sat Sep  7 09:17:14 2002

Apparently this a known bug in my version of Perl (5.005_03). DreamHost told me they were going to upgrade to a more recent Debian soon; hopefully they'll upgrade Perl at the same time.

Anyway, the net result of this is that my times are all going to be an hour off. Since the bug isn't in my code, I will not be changing this.