Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Time-Local CPAN distribution.

Report information
The Basics
Id: 43346
Status: rejected
Priority: 0/
Queue: Time-Local

People
Owner: Nobody in particular
Requestors: perl [...] evancarroll.com
Cc:
AdminCc:

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



the assumption that a ear of undef should increment the ticks from epoch to the lowest year of the current century is lame.
Subject: TimeLocal.t
use strict; use warnings; use Test::More tests => 4; require_ok( 'Time::Local' ); require_ok( 'POSIX::strptime' ); my @tsStruct = POSIX::strptime("23:16:42", '%T'); ## Time::Local does not work with day as '0' ## Day must be '1' to just use Time functionality ## This sucks massive penis. $tsStruct[3] = 1; ok ( ! defined $tsStruct[5] , 'The year is undef' ); my $unixTics = Time::Local::timegm( @tsStruct ); cmp_ok ( $unixTics, '<=', 3_600*370 , <<EOF ) This was a simple test, a year of undef, triggered Time::Local to assume '0', and round down to the lowest year in the current century this is lame and shitty. EOF
We already discussed this on IRC, IIRC.