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:
parent
aa854b034a
commit
d5213adb7a
4 changed files with 31 additions and 9 deletions
|
|
@ -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/&/\&/g')\">$cshort</a>"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue