pub struct Zone { /* private fields */ }Expand description
a time zone: its name, standard offset and an optional daylight saving rule
Implementations§
Source§impl Zone
impl Zone
Sourcepub fn by_name(name: &str) -> Option<Zone>
pub fn by_name(name: &str) -> Option<Zone>
an IANA zone of the table (“Europe/Berlin”; “UTC”, “Etc/UTC”, “Z” also work)
Sourcepub fn from_windows(key: &str) -> Option<Zone>
pub fn from_windows(key: &str) -> Option<Zone>
the IANA zone of a Windows time zone key (“W. Europe Standard Time”)
Sourcepub fn windows_to_iana(key: &str) -> Option<&'static str>
pub fn windows_to_iana(key: &str) -> Option<&'static str>
the IANA name of a Windows time zone key
Sourcepub fn from_tzif(name: &str, data: &[u8]) -> Option<Zone>
pub fn from_tzif(name: &str, data: &[u8]) -> Option<Zone>
a zone from a TZif file (its footer rule; /etc/localtime), named name
pub fn name(&self) -> &str
Sourcepub fn std_offset(&self) -> i32
pub fn std_offset(&self) -> i32
the standard offset (seconds east of UTC)
Sourcepub fn is_dst(&self, secs: i64) -> bool
pub fn is_dst(&self, secs: i64) -> bool
whether daylight saving time is in effect at an instant
Sourcepub fn offset_at(&self, secs: i64) -> i32
pub fn offset_at(&self, secs: i64) -> i32
the UTC offset (seconds east) in effect at an instant
Sourcepub fn abbrev_at(&self, secs: i64) -> &str
pub fn abbrev_at(&self, secs: i64) -> &str
the abbreviation in effect at an instant (“CET” / “CEST”)
Sourcepub fn from_local(&self, c: &Civil) -> LocalResult
pub fn from_local(&self, c: &Civil) -> LocalResult
the instants of a wall time (seconds; nanos kept)
Trait Implementations§
impl Eq for Zone
impl StructuralPartialEq for Zone
Auto Trait Implementations§
impl Forget for Zone
impl Freeze for Zone
impl RefUnwindSafe for Zone
impl Send for Zone
impl Sync for Zone
impl Unpin for Zone
impl UnsafeUnpin for Zone
impl UnwindSafe for Zone
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