Skip Menu |
 

This queue is for tickets about the bioperl CPAN distribution.

Report information
The Basics
Id: 124552
Status: new
Priority: 0/
Queue: bioperl

People
Owner: Nobody in particular
Requestors: bitcardbmw [...] lsmod.de
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 1.7.0._2
Fixed in: (no value)



Subject: timegm should be called with 4-digit year
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: Web
Message-ID: <rt-4.0.18-28629-1519398669-1934.0-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1519398669-28629-8"
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
Content-Length: 201
Download (untitled) / with headers
text/plain 201b
man Time::Local says Whenever possible, use an absolute four digit year instead. With a detailed explanation about ambiguity of 2-digit years above that. Please review/test/merge the attached patch
Subject: fix.patch
MIME-Version: 1.0
Content-Type: text/x-patch; name="fix.patch"
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline; filename="fix.patch"
Content-Transfer-Encoding: binary
Content-Length: 1199
Download fix.patch
text/x-diff 1.1k
Index: BioPerl-1.007002/maintenance/cvs2cl_by_file.pl =================================================================== --- BioPerl-1.007002.orig/maintenance/cvs2cl_by_file.pl +++ BioPerl-1.007002/maintenance/cvs2cl_by_file.pl @@ -2333,7 +2333,7 @@ sub parse_date_author_and_state { die "Bad date or Y2K issues" unless $year > 1969 and $year < 2258; # Kinda arbitrary, but useful as a sanity check - my $time = timegm($secs, $min, $hours, $mday, $mon-1, $year-1900); + my $time = timegm($secs, $min, $hours, $mday, $mon-1, $year); if ( defined $utcOffset ) { my ($plusminus, $hour, $minute) = ($utcOffset =~ m/([+-])(\d\d)(\d\d)/); my $offset = (($hour * 60) + $minute) * 60 * ($plusminus eq '+' ? -1 : 1); @@ -2409,7 +2409,7 @@ sub maybe_grab_accumulation_date { # convert the utc time to a time value my ($year,$mon,$mday,$hour,$min) = $boundary_date =~ m#(\d+)-(\d+)-(\d+)\s+(\d+):(\d+)#; - my $time = timegm(0,$min,$hour,$mday,$mon-1,$year-1900); + my $time = timegm(0,$min,$hour,$mday,$mon-1,$year); # print the timevalue in the local timezone my ($ignore,$wday); ($ignore,$min,$hour,$mday,$mon,$year,$wday) = localtime($time);


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.