Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | From c796775cdbd2cce06acbb7ac355187d4063017a2 Mon Sep 17 00:00:00 2001 |
| 2 | From: Chris Lamb <lamby@debian.org> |
| 3 | Date: Wed, 15 Apr 2015 20:42:53 -0700 |
| 4 | Subject: Make the embedded date from Pod::Man reproducible |
| 5 | |
| 6 | While working on the "reproducible builds" effort, we have noticed |
| 7 | that Pod::Man generates output that varies depending on the current |
| 8 | timezone. |
| 9 | |
| 10 | The attached patch fixes this by using GMT (~UTC) dates instead. |
| 11 | |
| 12 | (backported to Perl 5.20.2 by Niko Tyni <ntyni@debian.org>) |
| 13 | |
| 14 | Origin: upstream, http://git.eyrie.org/?p=perl/podlators.git;a=commitdiff;h=913fbb2bd2ce071e20128629302ae2852554cad4 |
| 15 | Bug-Debian: https://bugs.debian.org/780259 |
| 16 | Patch-Name: fixes/podman-utc.diff |
| 17 | --- |
| 18 | cpan/podlators/lib/Pod/Man.pm | 2 +- |
| 19 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 20 | |
| 21 | diff --git a/cpan/podlators/lib/Pod/Man.pm b/cpan/podlators/lib/Pod/Man.pm |
| 22 | index 0536662..c3ba201 100644 |
| 23 | --- a/cpan/podlators/lib/Pod/Man.pm |
| 24 | +++ b/cpan/podlators/lib/Pod/Man.pm |
| 25 | @@ -910,7 +910,7 @@ sub devise_date { |
| 26 | |
| 27 | # Can't use POSIX::strftime(), which uses Fcntl, because MakeMaker uses |
| 28 | # this and it has to work in the core which can't load dynamic libraries. |
| 29 | - my ($year, $month, $day) = (localtime($time))[5,4,3]; |
| 30 | + my ($year, $month, $day) = (gmtime($time))[5,4,3]; |
| 31 | return sprintf("%04d-%02d-%02d", $year + 1900, $month + 1, $day); |
| 32 | } |
| 33 | |