Skip to content

Stub out tzdb support for Windows and POSIX tz string#100

Merged
nekevss merged 16 commits intomainfrom
support-windows-tzdb
Nov 3, 2024
Merged

Stub out tzdb support for Windows and POSIX tz string#100
nekevss merged 16 commits intomainfrom
support-windows-tzdb

Conversation

@nekevss
Copy link
Copy Markdown
Member

@nekevss nekevss commented Oct 29, 2024

Builds on #99.

This PR adds resolving the POSIX tz string and should allow handling time zones on Windows via jiff_tzdb as a source, which should make the stub overall somewhat stable overall until a different solution can be put into place.

@nekevss nekevss force-pushed the support-windows-tzdb branch 2 times, most recently from d051b6e to f000300 Compare October 29, 2024 23:00
@nekevss nekevss marked this pull request as ready for review October 29, 2024 23:02
@nekevss nekevss force-pushed the support-windows-tzdb branch from f000300 to 65b0cc5 Compare October 31, 2024 05:50
@nekevss nekevss changed the base branch from stub-tzdb-support to main October 31, 2024 19:48
@nekevss nekevss force-pushed the support-windows-tzdb branch from 65b0cc5 to cc457ba Compare October 31, 2024 20:15
@nekevss nekevss force-pushed the support-windows-tzdb branch from cc457ba to 5eebe3c Compare October 31, 2024 20:16
@nekevss nekevss force-pushed the support-windows-tzdb branch from 4499779 to d1b57c5 Compare October 31, 2024 20:31
Copy link
Copy Markdown
Member

@jasonwilliams jasonwilliams left a comment

Choose a reason for hiding this comment

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

I think it might be good to have some description on what the Tzif struct is as there's currently no documentation written above it. I assume it's short for TimeZoneInFo, not sure though.

I think the same could be said for some of the other new structs in tzdb.rs too like LocalTimeRecord and TransitionTimeSearch etc..

I'm not sure im understanding the slim format difference, the resulting Tzif result looks to be the same size (552 bytes) whichever format is used.

Tests look good

@nekevss
Copy link
Copy Markdown
Member Author

nekevss commented Nov 2, 2024

Very true. I'll update the docs now.

Comment thread src/tzdb.rs Outdated
@nekevss
Copy link
Copy Markdown
Member Author

nekevss commented Nov 2, 2024

I'm not sure im understanding the slim format difference, the resulting Tzif result looks to be the same size (552 bytes) whichever format is used.

The "slim" vs. "fat" format is laid out by zic. Basically, all OSs are compiled using the "fat" format, but if someone does a custom compilation, then a smaller range can be set for which the transition times are computed.

The zic docs can be found here. Primarily, zic's bloat and range flags.

@nekevss nekevss merged commit 2661407 into main Nov 3, 2024
@jedel1043 jedel1043 deleted the support-windows-tzdb branch November 3, 2024 14:35
@nekevss nekevss added the C-enhancement New feature or request label Nov 3, 2024
jedel1043 pushed a commit that referenced this pull request Nov 3, 2024
Re: title, depends on #99 and #100

This PR implements `ZonedDateTime`'s add and subtract methods along with
related `TimeZone` operations that were needed.

There is also one test to verify the results based off test262.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants