[Git][reproducible-builds/reproducible-website][master] 3 commits: source-date-epoch: print UTC date in Dockerfile example

Bernhard M. Wiedemann (@bmwiedemann-guest) gitlab at salsa.debian.org
Mon Oct 19 17:17:33 UTC 2026



Bernhard M. Wiedemann pushed to branch master at Reproducible Builds / reproducible-website


Commits:
ae7abde9 by Bernhard M. Wiedemann at 2026-10-19T19:12:45+02:00
source-date-epoch: print UTC date in Dockerfile example

- - - - -
83152532 by Bernhard M. Wiedemann at 2026-10-19T19:12:53+02:00
source-date-epoch: add missing net/http import to Go example

The example uses http.TimeFormat.

- - - - -
4d78fc55 by Bernhard M. Wiedemann at 2026-10-19T19:17:04+02:00
source-date-epoch: fix timezone offset in faketime example

faketime reads the -f time string as local time, but it was
formatted in UTC, so the faked time was off by the local UTC offset.

- - - - -


1 changed file:

- _docs/source-date-epoch.md


Changes:

=====================================
_docs/source-date-epoch.md
=====================================
@@ -204,7 +204,7 @@ RUN [...]
   SOURCE_DATE_EPOCH="$(find /src -type f -exec stat -c '%Y' {} + | sort -nr | head -n1)"; \
   export SOURCE_DATE_EPOCH; \
 # for logging validation/edification
-  date --date "@$SOURCE_DATE_EPOCH" --rfc-2822; \
+  date --utc --date "@$SOURCE_DATE_EPOCH" --rfc-2822; \
   [...]
 ```
 
@@ -319,6 +319,7 @@ if ((source_date_epoch = getenv("SOURCE_DATE_EPOCH")) == NULL ||
 ```go
 import (
         "fmt"
+        "net/http"
         "os"
         "strconv"
         "time"
@@ -509,7 +510,7 @@ if (Sys.getenv("SOURCE_DATE_EPOCH") == "") {
 # Depends: faketime
 # Eventually the upstream tool should support SOURCE_DATE_EPOCH internally.
 test -n "$SOURCE_DATE_EPOCH" || { echo >&2 "$0: SOURCE_DATE_EPOCH not set"; exit 255; }
-exec env NO_FAKE_STAT=1 faketime -f "$(TZ=UTC date -d "@$SOURCE_DATE_EPOCH" +'%Y-%m-%d %H:%M:%S')" /usr/bin/a2x "$@"
+exec env NO_FAKE_STAT=1 TZ=UTC faketime -f "$(TZ=UTC date -d "@$SOURCE_DATE_EPOCH" +'%Y-%m-%d %H:%M:%S')" /usr/bin/a2x "$@"
 ```
 
 `debian/rules`:



View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/compare/7871aaee6407f2a5ecea9683259ddccc2123b2fe...4d78fc552697b9163d5a280bd5e5a3f83d1cfd8d

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/compare/7871aaee6407f2a5ecea9683259ddccc2123b2fe...4d78fc552697b9163d5a280bd5e5a3f83d1cfd8d
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20261019/28fcc87f/attachment.htm>


More information about the rb-commits mailing list