[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7923] use SOURCE_DATE_EPOCH
From: |
gavinsmith0123 |
Subject: |
[7923] use SOURCE_DATE_EPOCH |
Date: |
Sun, 23 Jul 2017 03:25:03 -0400 (EDT) |
Revision: 7923
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7923
Author: gavin
Date: 2017-07-23 03:25:03 -0400 (Sun, 23 Jul 2017)
Log Message:
-----------
use SOURCE_DATE_EPOCH
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/Common.pm
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2017-07-16 19:01:34 UTC (rev 7922)
+++ trunk/ChangeLog 2017-07-23 07:25:03 UTC (rev 7923)
@@ -1,3 +1,10 @@
+2017-07-23 Alexis Bienven\xFCe <address@hidden> (tiny change)
+
+ * tp/Texinfo/Common.pm (expand_today):
+ Honour the SOURCE_DATE_EPOCH environment variable to get a
+ reproducible @today value for info output when it is set.
+ See https://reproducible-builds.org/specs/source-date-epoch/.
+
2017-07-16 Gavin Smith <address@hidden>
* gnulib/m4/intlmacos.m4: Add this file, as gettextize doesn't
Modified: trunk/tp/Texinfo/Common.pm
===================================================================
--- trunk/tp/Texinfo/Common.pm 2017-07-16 19:01:34 UTC (rev 7922)
+++ trunk/tp/Texinfo/Common.pm 2017-07-23 07:25:03 UTC (rev 7923)
@@ -1208,8 +1208,13 @@
if ($self->get_conf('TEST')) {
return {'text' => 'a sunny day'};
}
- my($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst)
- = localtime(time);
+
+ my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst)
+ = ($ENV{SOURCE_DATE_EPOCH}
+ ? gmtime($ENV{SOURCE_DATE_EPOCH})
+ : localtime(time));
+ # See https://reproducible-builds.org/specs/source-date-epoch/.
+
$year += ($year < 70) ? 2000 : 1900;
return $self->gdt('{month} {day}, {year}',
{ 'month' => $self->gdt($MONTH_NAMES[$mon]),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7923] use SOURCE_DATE_EPOCH,
gavinsmith0123 <=