Repository navigation
fix(windows): the status clock prints local time, as Go does - #30
Merged
Merged
Conversation
init_local ported only time/zoneinfo_unix.go, so on Windows the clock of tsc -b --verbose and of the logger was UTC. On Windows it now takes the system zone through jiff (tz-system, zone data bundled for Windows only). Adds jiff-tzdb and jiff-tzdb-platform for cfg(windows). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
t3dotgg
reviewed
Oct 9, 2026
t3dotgg
left a comment
Member
There was a problem hiding this comment.
Note
🤖 Claude Opus 5.5 responding on behalf of Theo
Thanks. This is a real difference from tsc on Windows, so it is worth fixing.
My recommendation to Theo is to take this version:
jiffis already a dependency. The new features and the 2 crates (jiff-tzdb,jiff-tzdb-platform) arecfg(windows)only. Linux and macOS resolve the same set as before.- The other options are worse. The FFI port needs
unsafe, which the workspace forbids. Keeping UTC leaves a known difference intsc -b --verbose,--watchand the logs. - The one divergence (jiff reads
TZfirst on Windows) is small and marked withDIVERGES.
New crates need Theo's decision, so he will merge or close this. I approved the CI run (Linux and macOS only, so it checks that nothing changes there).
t3dotgg
added a commit
that referenced
this pull request
Oct 9, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The Go line is zoneinfo_windows.go:230 at go1.27.1. The comment now also names the unmapped-zone and daylight-setting differences, and that the logger test relies on jiff reading TZ on Windows. The section header no longer says the port is Unix only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Member
|
Note 🤖 Claude Opus 5.5 responding on behalf of Theo Thanks @jay911911. This is good. I will merge it. What I checked:
I added one commit (4f7a918). It fixes the Go line number and names the other small differences in the comment. |
JakubCzarlinski
pushed a commit
to JakubCzarlinski/ts-rust
that referenced
this pull request
Oct 9, 2026
…er, --singleThreaded tsc -b and watch carry ids, value_symbol_links newtype) followups38 is main 8ac70c6 plus 7 commits, so this merge also brings main's PR code (pingdotgg#8, pingdotgg#10, pingdotgg#19, pingdotgg#30) and the light flake fix bf57472. Conflict: crates/ts_goport/tests/early_emit.rs. - ours (int56, eeflake1): the full K2 test change; build_emit_only_solution uses Solution and waits with Solution::wait_for_a_later_mtime. - theirs (main bf57472): only the mtime wait (free fn wait_for_a_later_mtime) in the old build_emit_only_solution. Took ours, as state note main-flake-fix-2026-10-09 says (int56 carries the full eeflake1 change, which includes the mtime wait). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Problem
On Windows the status clock is UTC.
tsc -b --verbose,--watchand the logger print it; the pinned Go build prints local time.init_localinexecute/tsc/diagnostics.rsports onlytime/zoneinfo_unix.go($TZ,/etc/localtime, the zoneinfo directories). None of those exist on Windows, so it falls back to UTC. Go on Windows usestime/zoneinfo_windows.go, which asks the system.Change
On Windows
init_localisjiff::tz::TimeZone::try_system(), with UTC as the fallback, as in Go. The Unix body is unchanged and nowcfg(not(windows)).This needs two jiff features for
cfg(windows)only:tz-systemandtzdb-bundle-platform(Windows has no zoneinfo files, so the zone data comes with the binary).Cargo.lockgainsjiff-tzdbandjiff-tzdb-platform. Linux and macOS resolve the same features as before.This needs your decision
It adds crates, which your rules do not allow without one. The alternatives I see:
unsafeFFI toGetTimeZoneInformation, a 1:1 port ofzoneinfo_windows.go(the workspace forbidsunsafe)I chose the jiff features because it is the only option with no
unsafe. If you prefer another, please say so or close this.One difference from Go remains: jiff reads
TZfirst on Windows, Go on Windows does not read it. It is recorded in aDIVERGEScomment.Verification (Windows 11, rustc 1.99.0,
--release)project::logging::logger::tests::log_time_is_local_timefails before and passes after.tsc -b --verboseon a two-project build: the hour and AM/PM equal the pinned npm build's.cfg(windows)only.This work was done by an AI agent (Claude Code) on my Windows machine; the results above are from its runs there.
🤖 Generated with Claude Code
Note
Fix status clock to print local time on Windows
On Windows,
init_localin diagnostics.rs now resolves the system timezone through jiff and falls back to UTC when the lookup fails. This matches Go's local-time behavior for the status clock.Macroscope summarized 03cc33a.
Summary by CodeRabbit