monitoring: fix timezone bug in funders daily changes#329
Merged
chrisarridge merged 1 commit intolivefrom Mar 31, 2026
Merged
Conversation
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.
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.
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.