Cut months and days at Dublin midnight and show Dublin time - #51
Merged
Merged
Conversation
Every month, day cell, gate date and printed time was UTC and unlabelled, so through the summer each time a reader saw was an hour behind ESB's own, and a fault at 00:30 on the 1st counted in the previous month. Boundaries are now Dublin midnights held as UTC instants, so every window and customer-minute sum still runs on UTC; day cells come from calendar.monthrange. Case records stay UTC, so durations and estimate deltas keep subtracting UTC, and only printed times turn Dublin, through render._local and its site.html mirror on Intl with timeZone Europe/Dublin. The observed hover title is Dublin; observed_month is new for the "so far" wording. No grade letter moves on the corpus to 24 September. Checked in Chromium set to New York: 856 records render identically from JS and Python. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UqWuH6frirpbQDKnF5rEdT
Review of this PR showed the per-day key, the timeline row, the caveat dates, observed and observed_month could each revert to UTC with every test still passing; each now has a test that fails when it does, and the JS mirror's call sites are held by a text test since CI runs no JS. Also: - a page on an engine without zone data falls back to UTC times instead of failing to render at all - the sitemap lastmod is Dublin's date - the start is converted once per row in caseHtml - comments no longer restate the rule the note settles - July under Dublin months holds under two hours, not three - the note records the October repeated hour as an accepted edge Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UqWuH6frirpbQDKnF5rEdT
baz8080
force-pushed
the
claude/eager-sagan-wn68lr
branch
from
September 24, 2026 09:17
08d3c9c to
3a7aa66
Compare
This was referenced Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The follow-up to #48. Every month, day cell, gate date and printed time on the site was UTC, and none of it said so. From April to October, every time a reader saw was an hour behind ESB's own: an outage ESB lists at 15:15 read "began 14:15". A fault at 00:30 on the 1st, Irish time, was counted in the previous month.
The rule is store and compute in UTC, display in local time. lifts made the same fix on 2026-08-18.
What changed
month_bounds,month_list,partial_days, the per-day split and the day cells incounty_monthnow cut at Dublin midnight. Each boundary is converted back to a UTC instant (model.midnight), because subtracting two datetimes that share a zone loses the hour at a clock change. Every window and customer-minute sum still runs on UTC. The cell count comes fromcalendar.monthrange(a Dublin March is 23 h short).render._local, and its mirrorlocal()insite.html, which usesIntl.DateTimeFormatwithtimeZone: "Europe/Dublin". On an engine without zone data it falls back to UTC rather than failing to render. The payload shape doesn't change. This departs from the plan to follow lifts' approach of shipping Dublin wall-clock strings with precomputed durations: that approach is only needed when the record itself is local time.lastmod.generatedkeeps statusui's shared UTC stamp, and the CSV keeps its*_utccolumns.observed_monthgives the Dublin month for the "so far" wording.Documented in
notes/grading.md§ Months and days are Dublin's (2026-09-24), with a CLAUDE.md Settled row.What moves on the site
Built from esb-data to the 24 September horizon,
mainagainst this branch. No grade letter moves.Tests
observedandobserved_month. Each now has a test that fails when it is reverted; the per-day key and the timeline row were checked by reverting them. CI runs no JS, so the page's call sites are held by a text test.render.py, with no page errors.Checks
ruff check: clean.unittest discoverwithESB_DATA_DIRset: 308 tests OK.Review findings not taken
caseHtml. The remainingwhenAtconversions are a few per row and not worth threading a second argument through for.🤖 Generated with Claude Code
https://claude.ai/code/session_01UqWuH6frirpbQDKnF5rEdT