fix(time-range): use UTC date methods for 90-day backfill calculation#897
Merged
fix(time-range): use UTC date methods for 90-day backfill calculation#897
Conversation
The open-ended date range backfill used getDate()/setDate() which operate in the local timezone. When the machine's timezone differs from UTC, this could produce an off-by-one-day error at the start boundary. Switch to getUTCDate()/setUTCDate() to match the UTC format of the input ISO 8601 date string. Flagged by Cursor Bugbot on #892.
Contributor
|
Contributor
Codecov Results 📊✅ 6410 passed | Total: 6410 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 13195 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 75.95% 76.01% +0.06%
==========================================
Files 295 295 —
Lines 55028 55013 -15
Branches 0 0 —
==========================================
+ Hits 41794 41818 +24
- Misses 13234 13195 -39
- Partials 0 0 —Generated by Codecov Action |
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
getUTCDate()/setUTCDate()instead ofgetDate()/setDate()for the 90-day date backfill intimeRangeToApiParams()Flagged by Cursor Bugbot on #892 (comment).