From 18447569906f915c7801e9ac07500e6d72c8482d Mon Sep 17 00:00:00 2001 From: David Steele Date: Tue, 26 Jul 2016 17:40:42 -0400 Subject: [PATCH] Closed #209: Don't use "localtime" for HTML-docs. HTML footer dates are statically created in English in order to be reproducible. --- doc/manifest.xml | 15 ++++++++------- doc/xml/release.xml | 9 ++++++++- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/doc/manifest.xml b/doc/manifest.xml index 5459a9a2d..c34395473 100644 --- a/doc/manifest.xml +++ b/doc/manifest.xml @@ -20,11 +20,12 @@ n - + use Time::Local; use BackRestDoc::Custom::DocCustomRelease; my ($second, $minute , $hour, $mday, $month, $year) = localtime(); + $year += 1900; if ('{[release-date-static]}' eq 'y') { @@ -42,7 +43,10 @@ } } - timelocal(0, 0, 0, $mday, $month, $year); + my @stryMonth = ('January', 'February', 'March', 'April', 'May', 'June', + 'July', 'August', 'September', 'October', 'November', 'December'); + + $stryMonth[$month] . ' ' . $mday . ', ' . $year; @@ -50,12 +54,9 @@ - use POSIX qw(strftime); - - 'Copyright &copy; 2015' . '-' . strftime('%Y', localtime({[release-epoch]})) . + 'Copyright &copy; 2015' . '-' . substr('{[release-date]}', length('{[release-date]}') - 4) . ', The PostgreSQL Global Development Group, <a href="{[github-url-license]}">MIT License</a>. Updated ' . - strftime('%B ', localtime({[release-epoch]})) . trim(strftime('%e,', localtime({[release-epoch]}))) . - strftime(' %Y.', localtime({[release-epoch]})) + '{[release-date]}'; diff --git a/doc/xml/release.xml b/doc/xml/release.xml index 05fe57106..bb72ec205 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -99,7 +99,7 @@ - + @@ -154,6 +154,13 @@

Added release.pl to make releases reproducible. For now this only includes building and deploying documentation.

+ + + +

HTML footer dates are statically created in English in order to be reproducible.

+
+ +