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

Fix #4: Support timezones with non-hourly (non-integer) UTC offsets #38

Merged
merged 2 commits into from
Jan 16, 2023

Conversation

jnd-au
Copy link
Contributor

@jnd-au jnd-au commented Jan 16, 2023

Use the correct start hour for all timezones even when the UTC offset isn’t a round number of hours.

Before this fix the wrong start hour (integer) was calculated when timezones involved a part-hour offset, causing the wrong current hour to be highlighted, and entire timezone rows to be misaligned. This bug #4 impacted tz for more than a billion people. For example when working with India Standard Time (IST = UTC+05:30, known as “Asia/Calcutta” in tkuchiki/go-timezone) at UTC=12:45, tz could align India with 5 am as the current displayed hour but it should have been 6 am.

This fix uses the same approach as the emojis, which were displayed correctly.

@oz
Copy link
Owner

oz commented Jan 16, 2023

Hey James!

Thanks for the PR. This looks pretty great. 👍🏻

@oz oz merged commit aefff3b into oz:main Jan 16, 2023
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.

None yet

2 participants