From 6198856b5323d6204094293f01b890472618f182 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 15 Apr 2015 20:49:07 -0700 Subject: Documentation and test suite updates for UTC fix Update the Pod::Man and pod2man documentation and the test suite for the new UTC-based default page footer, and add a Changes entry. (backported to Perl 5.20.2 by Niko Tyni ) Origin: upstream, http://git.eyrie.org/?p=perl/podlators.git;a=commitdiff;h=52db93bf80e4a06f8497e4ebade0506b6ee0e70d Bug-Debian: https://bugs.debian.org/780259 Patch-Name: fixes/podman-utc-docs.diff --- cpan/podlators/lib/Pod/Man.pm | 6 +++++- cpan/podlators/scripts/pod2man.PL | 11 ++++++----- cpan/podlators/t/devise-date.t | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/cpan/podlators/lib/Pod/Man.pm b/cpan/podlators/lib/Pod/Man.pm index c3ba201..365892e 100644 --- a/cpan/podlators/lib/Pod/Man.pm +++ b/cpan/podlators/lib/Pod/Man.pm @@ -910,6 +910,8 @@ sub devise_date { # 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. + # Use gmtime instead of localtime so that the generated man page does not + # depend on the local time zone setting and is more reproducible my ($year, $month, $day) = (gmtime($time))[5,4,3]; return sprintf("%04d-%02d-%02d", $year + 1900, $month + 1, $day); } @@ -1656,7 +1658,9 @@ environment variable POD_MAN_DATE, if set, will be used. Failing that, the modification date of the input file will be used, or the current time if stat() can't find that file (which will be the case if the input is from C). If obtained from the file modification date or the -current time, he date will be formatted as C. +current time, the date will be formatted as C and will be based +on UTC (so that the output will be reproducible regardless of local time +zone). =item errors diff --git a/cpan/podlators/scripts/pod2man.PL b/cpan/podlators/scripts/pod2man.PL index 6af3474..38695f8 100644 --- a/cpan/podlators/scripts/pod2man.PL +++ b/cpan/podlators/scripts/pod2man.PL @@ -174,9 +174,10 @@ Contributed Perl Documentation", but also see B<--official> below. =item B<-d> I, B<--date>=I -Set the left-hand footer string to this value. By default, the modification -date of the input file will be used, or the current date if input comes from -C. +Set the left-hand footer string to this value. By default, the +modification date of the input file will be used, or the current date if +input comes from C, and will be based on UTC (so that the output +will be reproducible regardless of local time zone). =item B<-errors>=I