develooper Front page | perl.libwww | Postings from March 2003

problem with HTTP::Date

Thread Next
From:
William Harris
Date:
March 12, 2003 03:58
Subject:
problem with HTTP::Date
Message ID:
EF2A6489-5481-11D7-B250-000393454092@perspectix.com
Hi,

I just installed Perl 5.8.0 and am trying to install libwww. 
Unfortunately, I'm having a problem with the Date functions, which is 
causing a lot of other stuff to fail as well. Basically, my problem is 
that (for example) the following test fails (copied from the date.t 
test file):

my $offset = ($^O eq "MacOS") ? Time::Local::timegm(0,0,0,1,0,70) : 0;
print "offset: $offset\n";
my $time = (760233600 + $offset);  # assume broken POSIX counting of 
seconds

# test time2str
my $res = time2str($time);
die "time2str failed"
     unless $res eq 'Thu, 03 Feb 1994 00:00:00 GMT';

On my system, $res is Wed, 02 Feb 1994 23:59:42 GMT. I am running linux 
2.2.16 kernel. What's up with this "broken POSIX" stuff?

Any help or ideas would be appreciated.

regards,
Will Harris


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About