Give the upgrade window its own timezone, not the system #111
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/upgrade-window-timezone"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces #109, which set the system timezone per machine. This does the narrower thing.
An upgrade restarts the app and the Fujitsu dispenser runs an audible init routine when it does. On sintra that was firing at 10:17 in the morning, in the room, because
dates = "04:00"is local time and every machine inheritsAmerica/Guatemalafrom the shared base config.systemd 252+ accepts a timezone suffix on a calendar spec, and
system.autoUpgrade.datespasses straight through toOnCalendar. So the timer can follow Europe/Paris and its DST while the system clock stays a fleet default nobody has to maintain per host.Worth saying why the system timezone turned out not to be the right lever. It has exactly two consumers that matter here. The upgrade window, which this handles directly. And the operator wanting correct transaction times, which never needed the machine at all: the dashboard renders in the reader's own browser locale, which is why the cassettes tab read correctly while the journal did not. What is left is a technician reading the journal at the machine, and for correlating against relay
created_atstamps UTC is easier anyway.Verified by resolving the config for all four hosts:
and against
systemd-analyzeon sintra itself, where04:00 Europe/Parisresolves to 02:00 UTC and04:00 America/Guatemalato 10:00 UTC.A trap, documented in the comment because it nearly caught me. The same check under
nix-shell -p systemdsilently computes every named zone as UTC, while still echoing the zone back in its "Normalized form" line. It looks accepted and is wrong. The sandbox cannot resolve named zones and fails soft. Test on a real system.The map is keyed on model like
fiatCodeForModel, and inherits the same limitation, which the comment records: model is a hardware model and only doubles as host identity while there is one machine of each. A second sintra in another country needs this keyed on host, along with the fiat code and the app build that bakes it in.Deploy note: the timer's last-run stamp is newer than the new window's most recent occurrence, so
Persistent=trueshould not cause a catch-up fire on switch. Worth a glance atsystemctl list-timers nixos-upgradeafterwards.