pub struct TimeZoneInfo;Expand description
Access to the local time zone of the current thread.
Implementations§
Source§impl TimeZoneInfo
impl TimeZoneInfo
Sourcepub const MAX_OFFSET: TimeSpan
pub const MAX_OFFSET: TimeSpan
The largest offset from UTC, 14 hours (in either direction).
Sourcepub fn set_local_utc_offset_provider(
provider: Option<LocalUtcOffsetProvider>,
) -> Option<LocalUtcOffsetProvider>
pub 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.
Sourcepub fn get_local_utc_offset(utc_time: DateTime) -> TimeSpan
pub fn get_local_utc_offset(utc_time: DateTime) -> TimeSpan
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.
Sourcepub fn get_utc_offset_of_local_time(local_time: DateTime) -> TimeSpan
pub fn get_utc_offset_of_local_time(local_time: DateTime) -> TimeSpan
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.
Auto Trait Implementations§
impl Freeze for TimeZoneInfo
impl RefUnwindSafe for TimeZoneInfo
impl Send for TimeZoneInfo
impl Sync for TimeZoneInfo
impl Unpin for TimeZoneInfo
impl UnsafeUnpin for TimeZoneInfo
impl UnwindSafe for TimeZoneInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more