mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
Closed #209: Don't use "localtime" for HTML-docs.
HTML footer dates are statically created in English in order to be reproducible.
This commit is contained in:
parent
273d1c08d8
commit
1844756990
@ -20,11 +20,12 @@
|
||||
|
||||
<!-- Release date - static allows for reproducible builds -->
|
||||
<variable key="release-date-static">n</variable>
|
||||
<variable key="release-epoch" eval="y">
|
||||
<variable key="release-date" eval="y">
|
||||
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;
|
||||
</variable>
|
||||
|
||||
<!-- Logo locations -->
|
||||
@ -50,12 +54,9 @@
|
||||
|
||||
<!-- HTML variables -->
|
||||
<variable key="html-footer" eval='y'>
|
||||
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]}';
|
||||
</variable>
|
||||
<!-- <variable key="html-logo"><img src="{[project-logo]}"></variable> -->
|
||||
|
||||
|
@ -99,7 +99,7 @@
|
||||
</contributor-list>
|
||||
|
||||
<release-list>
|
||||
<release date="XXX-XX-XX" version="1.04dev" title="UNDER DEVELOPMENT">
|
||||
<release date="XXXX-XX-XX" version="1.04dev" title="UNDER DEVELOPMENT">
|
||||
<release-core-list>
|
||||
<release-bug-list>
|
||||
<release-item>
|
||||
@ -154,6 +154,13 @@
|
||||
<p>Added <file>release.pl</file> to make releases reproducible. For now this only includes building and deploying documentation.</p>
|
||||
</release-item>
|
||||
</release-feature-list>
|
||||
|
||||
<release-refactor-list>
|
||||
<release-item>
|
||||
<p>HTML footer dates are statically created in English in order to be reproducible.</p>
|
||||
</release-item>
|
||||
|
||||
</release-refactor-list>
|
||||
</release-doc-list>
|
||||
|
||||
<release-test-list>
|
||||
|
Loading…
Reference in New Issue
Block a user