release 1.13.3: sticky generated time in Europe/Zurich (CEST)

Display wall-clock like local `date` (CEST/CET), not UTC …Z. ISO datetime
keeps +02:00 offset so the live age counter stays correct.
This commit is contained in:
Hernâni Marques 2026-07-19 02:43:17 +02:00
parent aa854b034a
commit d5213adb7a
No known key found for this signature in database
GPG key ID: CB5738652768F7E9
4 changed files with 31 additions and 9 deletions

View file

@ -293,8 +293,14 @@ write_bootstrap_html() {
local curl="${COMMIT_URL:-}"
local clink="$cshort"
local gen iso
gen=$(date -u +"%Y-%m-%d %H:%M:%SZ" 2>/dev/null || date)
iso=$(date -u +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null || date -Iseconds)
# Local wall clock (CEST/CET · MESZ/MEZ on CH/DE hosts), not UTC Z
if TZ=Europe/Zurich date +"%Y-%m-%d %H:%M:%S %Z" >/dev/null 2>&1; then
gen=$(TZ=Europe/Zurich date +"%Y-%m-%d %H:%M:%S %Z")
iso=$(TZ=Europe/Zurich date +"%Y-%m-%dT%H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/')
else
gen=$(date +"%Y-%m-%d %H:%M:%S %Z" 2>/dev/null || date)
iso=$(date -Iseconds 2>/dev/null || date)
fi
if [ -n "$curl" ]; then
clink="<a href=\"$(printf '%s' "$curl" | sed 's/&/\&amp;/g')\">$cshort</a>"
fi