Fix timezone-unstable day-aggregator tests#322
Merged
Conversation
Timestamps with Z are interpreted as UTC, causing date bucketing tests to fail in non-UTC timezones (e.g. UTC+12 shifts Apr 9 10:00Z to Apr 8). Local timestamps without Z are interpreted in the runtime timezone, matching how the aggregator actually buckets dates. Based on #112 by @lfl1337, extended to cover all affected timestamps.
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.
Summary
Zsuffix from test timestamps intests/day-aggregator.test.tsso date bucketing tests pass in all timezonesZare UTC, which shifts dates in non-UTC zones (e.g.Apr 9 10:00ZbecomesApr 8 22:00in UTC-12)Zmatch how the aggregator actually interprets datesBased on #112 by @lfl1337, extended to cover all affected timestamps (the original PR only fixed 2 of 17).