FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TimeZoneInfo

    struct · ferroui-base · v0.5.0

    struct TimeZoneInfo
    

    Access to the local time zone of the current thread.

    View source

    Members

    MAX_OFFSET

    const MAX_OFFSET: SignedDuration
    

    The largest offset from UTC, 14 hours (in either direction).

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.