Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Convert-ASN1 CPAN distribution.

Report information
The Basics
Id: 124537
Status: new
Priority: 0/
Queue: Convert-ASN1

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

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



Subject: timegm should be called with 4-digit year
Download (untitled) / with headers
text/plain 279b
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. The old code would already mis-interpret a date of 1918 as 2018 Please review/test/merge the attached patch (not tested)
Subject: fix.patch
Download fix.patch
text/x-diff 436b
Index: Convert-ASN1-0.27/lib/Convert/ASN1/_decode.pm =================================================================== --- Convert-ASN1-0.27.orig/lib/Convert/ASN1/_decode.pm +++ Convert-ASN1-0.27/lib/Convert/ASN1/_decode.pm @@ -579,9 +579,7 @@ sub _dec_time { if ($bits[0] < 100) { $bits[0] += 100 if $bits[0] < 50; - } - else { - $bits[0] -= 1900; + $bits[0] += 1900; } $bits[1] -= 1; require Time::Local;


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.