Skip to content

Commit 0686135

Browse files
authored
Stub out tzdb support to unblock Now and ZonedDateTime (#99)
And thus begins the Great Time Zone / `ZonedDateTime` implementation. :sweat_smile: This stubs out `tzdb` support by relying solely on the user's zoneinfo files, and should allow us to move forward with implementing and testing `ZonedDateTime` without being blocked by a proper tzdb provider for Boa. This PR implements: - `Now` builtin - `FsTzdbProvider` stub - Some `ZonedDateTime` APIs along with experimental, non-engine focused APIs. Things of note that are not in this PR: - Handling POSIX's [proleptic tz format](https://snapshots.sourceware.org/glibc/trunk/2024-06-27_16-55_1719507301/manual/html_node/Proleptic-TZ.html) and non-fat version of the TZDB. - Any thing zoneinfo / `zic` related. - Tests for more time zone edge cases - Many `ZonedDateTime` methods and abstract ops - **Windows Support** Let me know what you think :)
1 parent 37a4e06 commit 0686135

File tree

14 files changed

+1253
-84
lines changed

14 files changed

+1253
-84
lines changed

Cargo.lock

Lines changed: 247 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ edition = "2021"
99
authors = ["boa-dev"]
1010
license = "MIT OR Apache-2.0"
1111
repository = "https://github.com/boa-dev/temporal"
12-
rust-version = "1.79"
12+
rust-version = "1.80"
1313
exclude = [
1414
"docs/*",
1515
".github/*",
@@ -26,6 +26,11 @@ num-traits = "0.2.19"
2626
ixdtf = { version = "0.2.0", features = ["duration"]}
2727
log = { version = "0.4.0", optional = true }
2828

29+
tzif = { version = "0.2.3", optional = true }
30+
iana-time-zone = "0.1.61"
2931

3032
[features]
3133
log = ["dep:log"]
34+
experimental = ["tzdb"]
35+
tzdb = ["dep:tzif", "std"]
36+
std = []

0 commit comments

Comments
 (0)