Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 11868
Status: resolved
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: mjs [...] beebo.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 5.803
Fixed in: (no value)



Subject: str2time("1900-01-01") returns time_t of 2000-01-01
Year strings between 1900-01-01 and 1937-01-01 return a time_t of 100 years later (i.e. "1900-01-01" returns 946684800 (Sat Jan 1 00:00:00 2000). (The man page says that undef will be returned if the time "is outside the representable range.") (This is for HTTP::Date 1.46, which I believe is the one in libwww 5.803.)
From: mjs [...] beebo.org
i.e. $ perl -MHTTP::Date=str2time -e 'print scalar localtime(str2time("1900-01-01")), "\n"' Sat Jan 1 00:00:00 2000 $ perl -MHTTP::Date=str2time -e \ 'print scalar localtime(str2time("1899-01-01")), "\n"' Thu Jan 1 01:00:00 1970 (This is scalar localtime(undef), as the above should be.)