pub struct TimeZone(/* private fields */);Expand description
A time zone, for writing a Timestamp as local time.
Implementations§
Source§impl TimeZone
impl TimeZone
Sourcepub fn system() -> &'static Self
pub fn system() -> &'static Self
Gets the local time zone of the system.
The time zone is detected on the first call and reused for the life of the process. If the TZ environment
variable is set, it alone decides the time zone: a value that can’t be resolved gives UTC, without looking
anywhere else. Otherwise, the time zone comes from /etc/localtime on Unix or the system settings on Windows,
falling back to UTC if no time zone can be found.
The first call may read the system’s time zone database from disk, so make it during startup rather than on a hot path.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TimeZone
impl RefUnwindSafe for TimeZone
impl Send for TimeZone
impl Sync for TimeZone
impl Unpin for TimeZone
impl UnsafeUnpin for TimeZone
impl UnwindSafe for TimeZone
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Track for T
impl<T> Track for T
Source§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self> ⓘ
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self> ⓘ
Instruments this type by attaching the given resource group token, returning a
Tracked wrapper. Read more