Skip to content

stats-api: Fix downloads csv timezone conversion - #239

Merged
carly-jones merged 4 commits into
mainfrom
fix-monthly-downloads-csv-utc
Oct 7, 2026
Merged

carly-jones merged 4 commits into
mainfrom
fix-monthly-downloads-csv-utc

Conversation

@carly-jones

@carly-jones carly-jones commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Ticket(s): n/a

Description

This PR fixes a bug related to timezone handling and another related to the scope of the test db fixture.

The downloads csv now converts its New York latest_hour to naive utc before querying so it matches the page total instead of missing the latest 4–5 hours. Utils are also updated so every service method provides naive utc datetimes to the repository.

Updating the tests revealed a bug in the test db fixture - it is now session-scoped, so every test file gets the mock data (before only the first module did).

Testing instructions

Unit tests green

@carly-jones
carly-jones deployed to development October 6, 2026 19:50 — with GitHub Actions Active
@carly-jones carly-jones changed the title Fix downloads csv timezone conversion stats-api: Fix downloads csv timezone conversion Oct 7, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@carly-jones
carly-jones deployed to development October 7, 2026 19:46 — with GitHub Actions Active

@dginev dginev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Keep main's make_test_config with this branch's session-scoped app
fixture, and pass naive UTC datetimes in main's new empty-range
repository test to match this branch's repository convention.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@carly-jones
carly-jones deployed to development October 7, 2026 20:46 — with GitHub Actions Active
@carly-jones
carly-jones merged commit c5d4b92 into main Oct 7, 2026
3 checks passed
@carly-jones
carly-jones deleted the fix-monthly-downloads-csv-utc branch October 7, 2026 20:47

This branch was successfully deployed

1 active deployment
development — 770f3e73 Deployed Oct 7, 2026 by carly-jones via Build push stats api / build-push #148
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.

3 participants