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

Rework the Windows timezone implementation #390

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

Conversation

dkhalanskyjb
Copy link
Contributor

@dkhalanskyjb dkhalanskyjb commented Apr 29, 2024

  • Improved memory usage during timezone database initialization: now, buffer allocations are performed outside of loops.
  • Removed the last production-facing piece of cinterop. cinterop is still used in tests.
  • Added a thorough test to check that every timezone transition that we discovered is also a valid transition from the point of view of Windows.
  • Used the test to determine the logic that Windows uses for time zone handling, fixing all inconsistencies but a couple of small ones:
    • In some cases, Windows claims that the transition happens on 23:59:59.999, whereas we can express 24:00:00.000, the value that was actually intended.
    • For a couple of time zones, for years 2030+, Windows seems to use some custom logic that doesn't seem correct anyway, so we don't reimplement it.

@dkhalanskyjb dkhalanskyjb added this to the 0.7.0 milestone May 1, 2024
@dkhalanskyjb dkhalanskyjb changed the title Reuse buffers in the Windows implementation Rework the Windows timezone implementation May 4, 2024
@dkhalanskyjb dkhalanskyjb requested a review from ilya-g May 4, 2024 15:07
@dkhalanskyjb dkhalanskyjb marked this pull request as ready for review May 4, 2024 15:07
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

1 participant