-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Already valid archives for yesterday might get invalidated when using another timezone than UTC #22299
Conversation
4666205
to
f1e315d
Compare
5b65a56
to
7ce864f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've suggested a change from 'day switch' to 'midnight' as I think that is what was meant by it, when one day rolls over to a new day (and the date changes, time goes from 23:59:59 to 0:00:00). I asked ChatGPT and midnight was the best suggestion.
With some of the tests where we now have a comment that the test may not be correct, what do we want to do about those? Should we remove the comments and create a new issue instead to look into those? |
There is #22331 to change that directly. |
Co-authored-by: Michal Kleiner <[email protected]>
Description:
Archiving automatically invalidates archives for today and yesterday if needed.
The checks for this including comparing the archived period for including today, as well as checking if the
ts_archived
for yesterdays archived was done afteryesterday
.It seems that those checks are not performed using the correct timezones.
While the archiving period is provided in the sites timezone,
ts_archived
is always stored asUTC
. Therefore checks with those dates need to use the same timezone.There actually had been tests for the method, which were all using
UTC
. Running the tests with other timezones actually caused failures. With the adjustments I did in the PR the tests are now passing for all timezones.Review