fix(viewer): use per-value timezone offset when inferring time formats - #267
Merged
Merged
Conversation
inferTimeFormatter applied the current UTC offset to every value, so with hasTimezone set, local midnights on the other side of a daylight saving change were read as 23:00 or 01:00 and the inferred format fell back to showing hours. Compute the offset for each value instead.
kwy404
force-pushed
the
fix-time-formatter-dst
branch
from
September 25, 2026 01:33
4a3f5bb to
8301246
Compare
donghaoren
approved these changes
Sep 29, 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.
inferTimeFormatterapplied the current UTC offset to every value whenhasTimezoneis set, so dates on the other side of a daylight saving change were read as 23:00 or 01:00 and the inferred format fell back to showing hours (for example "Jan 1 00:00" instead of "Jan 2024"). This computes the offset for each value instead.Added a unit test that pins
TZto America/New_York and checks that local midnights in January and July format as "Jan 2024" and "Jul 2024"; it fails before the change and passes after.