From 336155cf3f88a80fe4a48d273eeaef43d5322cf6 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 1 Jan 2020 21:23:41 -0600 Subject: [PATCH] perlPackages.TimeDate: fix tests that fail as of 2020 --- pkgs/development/perl-modules/timedate-2020.patch | 12 ++++++++++++ pkgs/top-level/perl-packages.nix | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 pkgs/development/perl-modules/timedate-2020.patch diff --git a/pkgs/development/perl-modules/timedate-2020.patch b/pkgs/development/perl-modules/timedate-2020.patch new file mode 100644 index 000000000000..ea4d8307f03a --- /dev/null +++ b/pkgs/development/perl-modules/timedate-2020.patch @@ -0,0 +1,12 @@ +Index: TimeDate-2.30/t/getdate.t +=================================================================== +--- TimeDate-2.30.orig/t/getdate.t ++++ TimeDate-2.30/t/getdate.t +@@ -156,7 +156,7 @@ Jul 22 10:00:00 UTC 2002 ;102733200 + !; + + require Time::Local; +-my $offset = Time::Local::timegm(0,0,0,1,0,70); ++my $offset = Time::Local::timegm(0,0,0,1,0,1970); + + @data = split(/\n/, $data); diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 94ef32249981..db9c412877ff 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -19541,6 +19541,8 @@ let url = mirror://cpan/authors/id/G/GB/GBARR/TimeDate-2.30.tar.gz; sha256 = "11lf54akr9nbivqkjrhvkmfdgkbhw85sq0q4mak56n6bf542bgbm"; }; + # https://rt.cpan.org/Public/Bug/Display.html?id=124509 + patches = [ ../development/perl-modules/timedate-2020.patch ]; }; TimeDuration = buildPerlPackage {