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

Properly calculate weekly day codes from start week timestamp #2219

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

naveensingh
Copy link
Contributor

@naveensingh naveensingh commented Oct 2, 2023

Closes #2211

Since the start week timestamp is in the local timezone (see #2154), just adding 86400 to get the next day timestamp is not correct in regions with daylight savings time. This PR basically replaces weekTimestamp + index * 86400 with weekDateTime.plusDays(index).seconds() to delegate the offset calculation to Joda time.

Because start week timestamp is in local timezone, just adding 86400 is not correct in regions with daylight savings time. See SimpleMobileTools/Simple-Calendar#2211
@naveensingh naveensingh marked this pull request as ready for review October 2, 2023 12:26
@tibbi tibbi merged commit 32e63a2 into SimpleMobileTools:master Oct 3, 2023
@naveensingh naveensingh deleted the dst_fix_2211 branch October 3, 2023 06:43
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.

Events shown on wrong day
2 participants