fix(date): ensure Linux date utility returns UTC timestamps

Add -u flag to GNU date command in get_iso_timestamp() to match
the macOS implementation and function documentation. Both platforms
now consistently return UTC timestamps in YYYY-MM-DDTHH:MM:SS+00:00
format.

Before: date -Iseconds (returned local time on Linux)
After:  date -u -Iseconds (returns UTC on Linux)
This commit is contained in:
frankbria 2025-12-31 16:48:24 -07:00
parent 3d7db2c3ae
commit 70279c017e

View file

@ -14,8 +14,8 @@ get_iso_timestamp() {
# Use manual formatting and add colon to timezone offset
date -u +"%Y-%m-%dT%H:%M:%S%z" | sed 's/\(..\)$/:\1/'
else
# Linux (GNU date)
date -Iseconds
# Linux (GNU date) - use -u flag for UTC
date -u -Iseconds
fi
}