Subject: | timegm should be called with 4-digit year |
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 |
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;