Closed atoomic closed 3 years ago
Simple one-liner using different versions of perlbrew and a date further 2038
╰─> for p in $(ls /usr/local/perl/perls/perl-5.*/bin/perl | sort); do echo "# ==== $p"; (PERL5LIB= $p -MDate::Parse -e 1 2>&1 >/dev/null) || continue; echo "ok"; $p -MDate::Parse -e 'my $d = "1 Jan 2039 12:32:00 +0000"; print join( " ", strptime($d), "\n")'; done
# ==== /usr/local/perl/perls/perl-5.10.1/bin/perl
ok
00 32 12 1 0 139 0
# ==== /usr/local/perl/perls/perl-5.12.5/bin/perl
ok
00 32 12 1 0 139 0
# ==== /usr/local/perl/perls/perl-5.14.4/bin/perl
ok
00 32 12 1 0 139 0
# ==== /usr/local/perl/perls/perl-5.16.3/bin/perl
ok
00 32 12 1 0 139 0
# ==== /usr/local/perl/perls/perl-5.18.4/bin/perl
ok
00 32 12 1 0 139 0
# ==== /usr/local/perl/perls/perl-5.20.3/bin/perl
ok
00 32 12 1 0 139 0
# ==== /usr/local/perl/perls/perl-5.22.4/bin/perl
ok
00 32 12 1 0 139 0
# ==== /usr/local/perl/perls/perl-5.24.4/bin/perl
ok
00 32 12 1 0 139 0
# ==== /usr/local/perl/perls/perl-5.26.1/bin/perl
ok
00 32 12 1 0 139 0
# ==== /usr/local/perl/perls/perl-5.26.2/bin/perl
ok
00 32 12 1 0 139 0
# ==== /usr/local/perl/perls/perl-5.28.0/bin/perl
ok
00 32 12 1 0 139 0
# ==== /usr/local/perl/perls/perl-5.30.1/bin/perl
ok
00 32 12 1 0 139 0 20
# ==== /usr/local/perl/perls/perl-5.32.0/bin/perl
ok
00 32 12 1 0 139 0 20
# ==== /usr/local/perl/perls/perl-5.8.9/bin/perl
ok
00 32 12 1 0 139 0
issue reported by Bram on irc:
Date::Parse docs: https://metacpan.org/pod/Date::Parse#LIMITATION - since perl v5.12.0 it can handle dates beyond 2038 ( https://metacpan.org/pod/Time::Local#Limits-of-time_t )