Skip to content

monitoring: fix timezone bug in funders daily changes#329

Merged
chrisarridge merged 1 commit intolivefrom
ca/fix-funder-daily-change-monitoring
Mar 31, 2026
Merged

monitoring: fix timezone bug in funders daily changes#329
chrisarridge merged 1 commit intolivefrom
ca/fix-funder-daily-change-monitoring

Conversation

@chrisarridge
Copy link
Copy Markdown
Contributor

This commit fixes #328 which was caused by UTC/BST differences meaning that funder records were not found. The data processing pipeline runs are triggered to happen just after midnight local time, but on a UTC->BST transition those runs then happen before midnight in UTC. Because the Django application is configured to use UTC as default (in settings.py), and there's no user timezone information ingested by the API, the BST differences are not picked up so funder records are not found and the monitoring API thinks the funders have been removed.

This fix sets the timezone in the API call to Europe/London so that BST differences are correctly handled and the records found. This commit also adds a couple of new test cases that check UTC->BST and also BST->UTC.

This commit fixes #328
which was caused by UTC/BST differences meaning that funder records were
not found.  Pipeline runs happen just after midnight local time, but on a
UTC->BST transition those runs then happen before midnight in UTC.
Because the server uses UTC as default, and there's no user timezone
information ingested by the API, the BST differences are not picked up
so funder records are not found and the monitoring API thinks the funders
have been removed.

This fix sets the timezone in the API call to Europe/London so that BST
differences are correctly handled and the records found.  This commit
also adds a couple of new test cases that check UTC->BST and also
BST->UTC.
Copy link
Copy Markdown

@mariongalley mariongalley left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you!

@chrisarridge chrisarridge merged commit 9968958 into live Mar 31, 2026
4 checks passed
@chrisarridge chrisarridge deleted the ca/fix-funder-daily-change-monitoring branch March 31, 2026 16:47
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.

Monitoring erroneously reported funder records are closed

2 participants