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

handle possible DST change within FloorTime() #568

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shrddr
Copy link

@shrddr shrddr commented May 11, 2024

see #256

Copy link
Author

@shrddr shrddr left a comment

Choose a reason for hiding this comment

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

According to https://stackoverflow.com/questions/8558919/mktime-and-tm-isdst gp.Tm.tm_isdst = -1; can sometimes produce unexpected result - when the return value of FloorTime() is within that one hour in October/November when same Local time has 2 possible GMT interpretations. When calling FloorTime(unit=year/month/day), it is not a problem, but might potentially become a problem when called with unit==hour/minute/second.

@shrddr
Copy link
Author

shrddr commented May 11, 2024

Additionally made major ticks nicer looking (take into account 23h/25h days when a DST change happens within the viewport)

before
image

after
image

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.

1 participant