Source: perl
Version: 5.20.2-2
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timestamps toolchain
X-Debbugs-Cc: [email protected]
Hi,
While working on the "reproducible builds" effort [1], we have noticed
that Pod::Man generates output that varies depending on the current
timezone.
The attached patch fixes this by using GMT (~UTC) dates instead
[1]: https://wiki.debian.org/ReproducibleBuilds
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` [email protected] / chris-lamb.co.uk
`-
diff -urNad perl.orig/cpan/podlators/lib/Pod/Man.pm
perl/cpan/podlators/lib/Pod/Man.pm
--- perl.orig/cpan/podlators/lib/Pod/Man.pm 2015-03-11 09:56:13.302634081
+0000
+++ perl/cpan/podlators/lib/Pod/Man.pm 2015-03-11 09:56:33.003521361 +0000
@@ -893,7 +893,7 @@
# Can't use POSIX::strftime(), which uses Fcntl, because MakeMaker
# uses this and it has to work in the core which can't load dynamic
# libraries.
- my ($year, $month, $day) = (localtime $time)[5,4,3];
+ my ($year, $month, $day) = (gmtime $time)[5,4,3];
return sprintf ("%04d-%02d-%02d", $year + 1900, $month + 1, $day);
}