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

problem with HTTP::Date

Thread Next
William Harris
March 12, 2003 03:58
problem with HTTP::Date
Message ID:

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 

# 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.

Will Harris

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About