local-time: the panel in the container's zone, named on Settings

Agreed by the owner on 2026-10-13 (the local day, no "UTC" beside a
time); the zone is the container's TZ in .env and Settings only shows it,
his "Да" of 2026-10-17. Mockups c205106.

Every time the panel shows is formatted in time.Local and says no zone:
the logs' Time and the DMARC Received columns, a message's timeline,
Overview's "Updated", Health's certificate and renewal, the filter lists,
DMARC reports and windows, the auto limit's last recalculation. Stored
instants stay UTC. The days counted are the zone's: delivery_log_days and
sender_check_days key their rows by the local date, the sender check cuts
downtime at local midnights (byDay), the log filters' days run from local
midnight to local midnight. Notification mail and the test message write
the zone's abbreviation after a time - they are read away from the panel.
DMARC's one-day window label stays the reporter's (UTC) day.

Settings box 05, Time zone, read-only: the name (UTC without TZ), its
offset, and a TZ the image cannot load said to leave the times in UTC
(time/zoneinfo_unix.go, initLocal) rather than named. TZ is passed by the
compose file ("${TZ:-}"), in .env.example and the guide's table; tzdata is
named in the image (supervisor's python3.13 brings it today). Postfix
takes TZ through import_environment, so mail.log's stamps are the same
zone, which closes the trap the roadmap wrote down: the tailer has always
read them in time.Local.

Tests: a TestMain runs view, handlers, store and cmd/panel in UTC whatever
the machine's zone (as logtail's); TestSettingsShowsTheTimeZone,
TestTimesAreTheContainersZone, TestByDayInTheContainersZone, a Moscow day
in TestQueryInboundSpamFilters; envdoc's pattern takes two-letter names.
e2e time_zone_is_the_containers recreates the stand with
TZ=Europe/Moscow: date says MSK, Settings names the zone and UTC+03:00, a
test message's page gives its time and its mail.log lines in Moscow's.
go vet + go test (26 packages) and make e2e on the test server for this
tree.

Docs: guide (§ Settings, the TZ row, the days of Health and the logs),
architecture, schema-migrations, help (word for word with the mockup),
CHANGELOG [Unreleased] § Added, roadmap row done with the decision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mix
2026-10-17 01:34:28 +03:00
co-authored by Claude Opus 5.5
parent c205106418
commit bdeb01681d
58 changed files with 484 additions and 117 deletions
+21 -1
View File
@@ -38,7 +38,7 @@ in `git log` and [CHANGELOG.md](../CHANGELOG.md).
| panel-notifications | E-mail notifications about important events | shipped `2.3.0` | 10/10 | [plans/panel-notifications.md](plans/panel-notifications.md) |
| delivery-log-storage | Keep a message's `mail.log` lines with its send-log row | shipped `2.2.0` | 8/8 | [plans/delivery-log-storage.md](plans/delivery-log-storage.md) |
| password-reset | Password reset by e-mail | agreed (2026-10-13) | — | — |
| local-time | The panel shows time, and counts its days, in a time zone other than UTC | agreed (2026-10-13; design questions open) | — | — |
| local-time | The panel shows time, and counts its days, in a time zone other than UTC | done 2026-10-17, unreleased | — | — |
| notification-mail-recheck | The Notification mail records on Server › Settings can be checked again from where they are shown | shipped `2.9.0` | — | — |
| settings-save-row | Server › Settings: the Save button no longer stands alone under a long right column | shipped `2.9.0` | — | — |
| dns-record-collapse | A DNS record that is right is shown folded: its name and its tag, the values on request | shipped `2.9.0` | — | — |
@@ -525,6 +525,26 @@ the database's stored instants and the e2e stay as they are.
**Version:** `2.x` MINOR; `agreed`; the plan is written when it is taken up.
**Where the zone comes from, changed (owner, 2026-10-17):** not a setting
in the panel but the container's own zone, `TZ` in `.env`; Settings only
shows it ("Да" to "пояс в `.env`, на Settings только показ?"). His reason
was the trap above: a container cannot change its zone without a restart,
and only the container's zone moves Postfix's stamps with the rest. So the
trap is closed by the third way - the container runs in the zone, Postfix
stamps `mail.log` in it (`TZ` is in Postfix's `import_environment`), and the
tailer reads the stamps in the same zone, as it always did (`lineTime`,
`time.Local`).
**Done (2026-10-17):** design c205106 (no "UTC" on any screen, Settings box
05 *Time zone*, read-only, the help topic). The panel formats every time in
`time.Local`; the day tables key their rows by the local date, the sender
check cuts downtime at local midnights, the log filters' days run from local
midnight; stored instants stay UTC. Notification mail and the test message
write the zone's abbreviation after a time (they are read away from the
panel). The year question settled as the mockups have it. `tzdata` is named
in the image. Tests run in UTC (a `TestMain` in each package that formats
or counts days) and in Moscow where the zone is the point.
---
## phone-desktop-mode