Skip to content
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

Add tests for FE date calculations, fix niggles with site context #4471

Merged
merged 4 commits into from
Aug 28, 2024

Conversation

apata
Copy link
Contributor

@apata apata commented Aug 27, 2024

Hypothesis: To correctly perform any date calculations, one needs to know the timezone: current offset is not enough, since the calculation may span the time when the offset changes.

However, when needing only date level precision, assuming the BE returns the offset as expected, I couldn't find any issues.

(The first commit seemed to verify the hypothesis, but it had an incorrect expectation.)

@apata apata force-pushed the dashboard-date-calculations-issue branch from 11ca19b to efb4ed6 Compare August 27, 2024 18:17
@apata apata changed the title Demonstrate issue with naive date calculations Tests for FE date calculations Aug 27, 2024
@apata apata force-pushed the dashboard-date-calculations-issue branch 6 times, most recently from 4f5c892 to af7dfa4 Compare August 28, 2024 07:54
@apata apata marked this pull request as ready for review August 28, 2024 07:54
@apata apata changed the title Tests for FE date calculations Add tests for FE date calculations, fix niggles with site context Aug 28, 2024
@apata apata force-pushed the dashboard-date-calculations-issue branch from af7dfa4 to 272710d Compare August 28, 2024 07:56
@apata apata added the preview label Aug 28, 2024
Copy link

Preview environment👷🏼‍♀️🏗️
PR-4471

Copy link
Contributor

@RobertJoonas RobertJoonas left a comment

Choose a reason for hiding this comment

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

Thanks for this! LGTM 👍

@apata apata merged commit 51fba1c into master Aug 28, 2024
12 checks passed
@apata apata deleted the dashboard-date-calculations-issue branch August 28, 2024 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants