Calendar
Calendar copied to clipboard
Incorrect Timezone in Code
Checklist
- [X] I can reproduce the bug with the latest version given here.
- [X] I made sure that there are no existing issues - open or closed - to which I could contribute my information.
- [X] I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
- [X] I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
- [X] I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
- [X] This issue contains only one bug.
- [X] I have read and understood the contribution guidelines.
Affected app version
1.0.3
Affected Android/Custom ROM version
Android 14
Affected device model
Pixel 8
How did you install the app?
F-Droid / IzzyOnDroid
Steps to reproduce the bug
-
Navigate to app/src/main/kotlin/org/fossify/calendar/helpers/MyTimeZones.kt
-
Note that the expected GMT offset for "Asia/Almaty" should be GMT+5 (since 2024), not GMT+6
Expected behavior
The correct association should be "GMT+5" for "Asia/Almaty"
Actual behavior
The code incorrectly associates "Asia/Almaty" with "GMT+6", which results in an incorrect time calculation.
Screenshots/Screen recordings
Additional information
No response
Hi, I second it! I spent two hours trying to figure out why my computer's events delay for an hour compared to my phone's event (I use CalDAV), and I'm finally happy to find a reason! I'm indeed in Almaty currently, my computer's tzdata is correct and it seems an issue is in a manually updated app/src/main/kotlin/org/fossify/calendar/helpers/MyTimeZones.kt file.
This PR seems okay for now: https://github.com/FossifyOrg/Calendar/pull/307/files
A better PR would update all timezones: https://www.joda.org/joda-time/timezones.html
The best PR would replace self-hosted timezone database with java.util.TimeZone: https://developer.android.com/reference/java/util/TimeZone
I've never programmed for Android, although I can help to investigate how to do this right.
Should be fixed in the next update.