Repository navigation
Admin times are proved against two runtime locales, and Sessions and Jobs get the default-zone story - #2310
Merged
Conversation
…Jobs get the default-zone story The default-locale unit test compared no locale with the runtime's own, so a formatter hard-coded to the machine's locale passed it. Node reads its locale once at start, so a new runtimeDates kit prints a time from a fresh process started under a German and a Japanese locale. The Sessions and Jobs kits gain the trait the Users kit has for a view that opens with no time zone of its own, through one shared TZ helper. Tests only; the formatter was right. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VjCSiB3Dk7BRBmjic6wFM5
marvin-bitterlich
enabled auto-merge
November 18, 2026 16:10
Coverage 91.9% (−0.1 pts)No coverable lines added.
|
marvin-bitterlich
deleted the
ccr-efcafb6c-sxkls9-admin-dates-defaults
branch
November 18, 2026 16:29
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.
Why?
#2305 made the built-in admin views show times in the viewer's locale and time zone. Two of its proofs were weak, as its own description said.
The default locale was proved by a unit test that compared "no locale" with the runtime's own locale. On a machine whose locale is
en-US, as this sandbox is, a hard-codeden-USpasses it. The default time zone had a screen story for the Users view only.How?
No behavior changes; the code was right. This adds tests only.
Default locale. Node reads its own locale once, when the process starts, so a test cannot change it the way the kits change
TZ. I checked: settingLC_ALLorLANGinside a running process leavesIntlon the old locale. A new small kit,runtimeDates, therefore starts a fresh Node process withLC_ALLandTZset and has it printtimestampTextfor one instant. Four stories read that text for a German and a Japanese runtime, with and without an explicit time zone. Two different runtime locales mean that a hard-coded locale, whichever it is, fails at least one story. These stories replace the unit test they supersede.Default time zone. The Sessions and Jobs kits gain the trait the Users kit has: the view opens with no time zone of its own in a browser whose zone is set through
TZ. The Sessions story reads the three times of a session in Tokyo time. Job timestamps come from the database clock, so the Jobs story compares each shown time with its owndateTimeinstant written in Kolkata time. TheTZstand-in moved to one helper that the three kits share.I checked each new test against a broken formatter:
en-USde-DEDecisions
.unittest may not stub the environment. The kit keeps the process start intest-support, and the stories read what the real formatter printed.Callouts
LC_ALLandTZas its environment.LC_ALL, which Node reads on Linux and macOS. On Windows they would not change the locale.test-supporthelper that writes an instant foren-GBin a named zone. The view under test is given the locale and no zone, so the story proves the zone default and not the format.Generated by Claude Code