diff --git a/cap-primitives/Cargo.toml b/cap-primitives/Cargo.toml index 17a5b2ad..d3e9c704 100644 --- a/cap-primitives/Cargo.toml +++ b/cap-primitives/Cargo.toml @@ -20,7 +20,6 @@ maybe-owned = "0.3.4" fs-set-times = "0.20.0" io-extras = "0.18.0" io-lifetimes = { version = "2.0.0", default-features = false } -iana-time-zone = "0.1.57" [dev-dependencies] cap-tempfile = { path = "../cap-tempfile" } diff --git a/cap-primitives/src/time/mod.rs b/cap-primitives/src/time/mod.rs index de64cd80..773e2f07 100644 --- a/cap-primitives/src/time/mod.rs +++ b/cap-primitives/src/time/mod.rs @@ -4,12 +4,10 @@ mod instant; mod monotonic_clock; mod system_clock; mod system_time; -mod timezone; pub use instant::Instant; pub use monotonic_clock::MonotonicClock; pub use system_clock::SystemClock; pub use system_time::SystemTime; -pub use timezone::Timezone; pub use std::time::{Duration, SystemTimeError}; diff --git a/cap-std/src/time/mod.rs b/cap-std/src/time/mod.rs index cddc705d..ff5d788d 100644 --- a/cap-std/src/time/mod.rs +++ b/cap-std/src/time/mod.rs @@ -3,8 +3,8 @@ //! This corresponds to [`std::time`]. //! //! Instead of [`std::time`]'s methods which return the current time, this -//! crate has methods on [`SystemClock`], [`MonotonicClock`] and [`Timezone`]. +//! crate has methods on [`SystemClock`] and [`MonotonicClock`]. pub use cap_primitives::time::{ - Duration, Instant, MonotonicClock, SystemClock, SystemTime, SystemTimeError, Timezone, + Duration, Instant, MonotonicClock, SystemClock, SystemTime, SystemTimeError, }; diff --git a/cap-time-ext/Cargo.toml b/cap-time-ext/Cargo.toml index fe75314a..796b9a3f 100644 --- a/cap-time-ext/Cargo.toml +++ b/cap-time-ext/Cargo.toml @@ -13,8 +13,10 @@ repository = "https://github.com/bytecodealliance/cap-std" edition = "2021" [dependencies] +ambient-authority = "0.0.2" cap-primitives = { path = "../cap-primitives", version = "^2.0.0" } cap-std = { path = "../cap-std", optional = true, version = "^2.0.0" } +iana-time-zone = "0.1.57" [target.'cfg(not(windows))'.dependencies] rustix = { version = "0.38.0", features = ["time"] } diff --git a/cap-time-ext/src/lib.rs b/cap-time-ext/src/lib.rs index f326142c..99a3de81 100644 --- a/cap-time-ext/src/lib.rs +++ b/cap-time-ext/src/lib.rs @@ -11,6 +11,8 @@ mod monotonic_clock; mod system_clock; +mod timezone; pub use monotonic_clock::MonotonicClockExt; pub use system_clock::SystemClockExt; +pub use timezone::Timezone; diff --git a/cap-primitives/src/time/timezone.rs b/cap-time-ext/src/timezone.rs similarity index 95% rename from cap-primitives/src/time/timezone.rs rename to cap-time-ext/src/timezone.rs index 3588f442..4cc440e8 100644 --- a/cap-primitives/src/time/timezone.rs +++ b/cap-time-ext/src/timezone.rs @@ -7,7 +7,6 @@ pub struct Timezone(()); #[derive(Debug)] pub struct TimezoneError(String); -//impl LocalResult for TimezoneError { impl Timezone { /// Constructs a new instance of `Self`. ///