Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bad hourly start timestamp on chart data #75

Merged
merged 2 commits into from
Apr 30, 2024
Merged

Conversation

benvinegar
Copy link
Owner

Fixes #60

Originally this tried to do some clever tz math inside Analytics Engine, but it doesn't work. Instead just explicitly calculate the utc start time, treat everything as utc, then convert back to local during UI rendering.

Also removes formatDateString because I think it was also doing some implicit timezone conversion in there somewhere. I found dayjs to be more predictable.

Copy link

codecov bot commented Apr 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.06%. Comparing base (26b539d) to head (72a46cd).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #75      +/-   ##
==========================================
- Coverage   79.28%   79.06%   -0.23%     
==========================================
  Files          18       18              
  Lines        2269     2245      -24     
  Branches      148      145       -3     
==========================================
- Hits         1799     1775      -24     
  Misses        465      465              
  Partials        5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@benvinegar benvinegar merged commit e48cb06 into main Apr 30, 2024
3 checks passed
@benvinegar benvinegar deleted the fix-tz-buckets branch April 30, 2024 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chart when viewed hourly (e.g. 24 hours or "Today") drops first 3 data points
1 participant