[CORE-134] Fix daylight savings time test bug #1475
Merged
+11
−6
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.
Ticket: https://broadworkbench.atlassian.net/browse/CORE-134
Previously, if the local timezone had an offset change in the next 30 days, certain tests would fail. I didn't figure out the full root cause, but it probably has to do with parts of the actual implementation using seconds (
NihLink(eraCommonsUsername, iat + 60 * 60 * 24 * 30)
) and the tests using days. Changing justminusDays
tominusSeconds
made it work, but I converted theplusDays
as well for good measure.The tests always passed in GH actions, so to replicate the problem and verify the solution (only within 30 days of a time changeover!):
https://xkcd.com/2867/