bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #64608] SOURCE_DATE_EPOCH: current timezone and DST offset used ins


From: Christian Franke
Subject: [bug #64608] SOURCE_DATE_EPOCH: current timezone and DST offset used instead of UTC
Date: Tue, 29 Aug 2023 07:57:30 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?64608>

                 Summary: SOURCE_DATE_EPOCH: current timezone and DST offset
used instead of UTC
                   Group: GNU roff
               Submitter: chrfranke
               Submitted: Tue 29 Aug 2023 11:57:28 AM UTC
                Category: Driver gropdf
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Tue 29 Aug 2023 11:57:28 AM UTC By: Christian Franke <chrfranke>
Testcase (on Cygwin):


$ groff --version
GNU groff version 1.23.0
...
GNU troff (groff) version 1.23.0
GNU grops (groff) version 1.23.0

$ echo $TZ ; date -Is
Europe/Berlin
2023-08-29T13:55:10+02:00

$ date -d '2023-01-01 UTC' +%s
1672531200

$ date -d @1672531200 -Is
2023-01-01T01:00:00+01:00

$ echo | SOURCE_DATE_EPOCH=1672531200 groff -Tpdf \
| grep -a 'Date'
5 0 obj << /CreationDate (D:20230101010000+02'00')
/ModDate (D:20230101010000+02'00')


Observed:
The timestamps use current timezone instead of UTC.
The time may be incorrect by one hour because current DST offset is used.
This may break reproducible builds.

Expected:
If SOURCE_DATE_EPOCH is set, UTC should be used regardless of current TZ.

Workaround:


$ echo | TZ=UTC SOURCE_DATE_EPOCH=1672531200 groff -Tpdf \
| grep -a 'Date'
5 0 obj << /CreationDate (D:20230101000000+00'00')
/ModDate (D:20230101000000+00'00')









    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64608>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]