TimeZoneInfo
struct · ferroui-base · v0.5.0
struct TimeZoneInfo
Access to the local time zone of the current thread.
Members
MAX_OFFSET
const MAX_OFFSET: SignedDuration
The largest offset from UTC, 14 hours (in either direction).
set_local_utc_offset_provider
fn set_local_utc_offset_provider(provider: Option<LocalUtcOffsetProvider>) -> Option<LocalUtcOffsetProvider>
Installs (or with None removes) the provider of the local UTC offset
of the current thread and returns the previous one.
get_local_utc_offset
fn get_local_utc_offset(utc_time: DateTime) -> SignedDuration
The offset of local time from UTC at the UTC instant utc_time
(zero when no provider is installed). The offset is truncated to whole
minutes and limited to 14 hours in either direction.
The provider is asked at the instant of utc_time; a date the
platform's SystemTime cannot hold (before 1970 on
wasm32-unknown-unknown) is asked at the Unix epoch.
get_utc_offset_of_local_time
fn get_utc_offset_of_local_time(local_time: DateTime) -> SignedDuration
The offset of local time from UTC for the local clock time
local_time. Around a transition of the offset the clock time can be
ambiguous or invalid; the offset in effect after the transition is
preferred.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.