pub struct TimeZone { /* private fields */ }Expand description
Time zone
Implementations
sourceimpl TimeZone
impl TimeZone
sourcepub fn local() -> Result<Self>
pub fn local() -> Result<Self>
Returns local time zone.
This method in not supported on non-UNIX platforms, and returns the UTC time zone instead.
sourcepub fn from_tz_data(bytes: &[u8]) -> Result<Self>
pub fn from_tz_data(bytes: &[u8]) -> Result<Self>
Construct a time zone from the contents of a time zone file
sourcepub fn from_posix_tz(tz_string: &str) -> Result<Self>
pub fn from_posix_tz(tz_string: &str) -> Result<Self>
Construct a time zone from a POSIX TZ string, as described in the POSIX documentation of the TZ environment variable.
sourcepub fn find_local_time_type(&self, unix_time: i64) -> Result<&LocalTimeType>
pub fn find_local_time_type(&self, unix_time: i64) -> Result<&LocalTimeType>
Find the local time type associated to the time zone at the specified Unix time in seconds
sourcepub fn find_current_local_time_type(&self) -> Result<&LocalTimeType>
pub fn find_current_local_time_type(&self) -> Result<&LocalTimeType>
Find the current local time type associated to the time zone
Trait Implementations
impl Eq for TimeZone
impl StructuralEq for TimeZone
impl StructuralPartialEq for TimeZone
Auto Trait Implementations
impl RefUnwindSafe for TimeZone
impl Send for TimeZone
impl Sync for TimeZone
impl Unpin for TimeZone
impl UnwindSafe for TimeZone
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more