pub struct TzString {
pub std_abbr: String,
pub std_utoff: i32,
pub dst: Option<Dst>,
}Expand description
A parsed POSIX TZ string. utoff_* are seconds EAST of UTC (so local = UTC + utoff), already
sign-flipped from the POSIX west-positive convention.
Fields§
§std_abbr: String§std_utoff: i32§dst: Option<Dst>Implementations§
Source§impl TzString
impl TzString
Sourcepub fn observe(&self, t: i64) -> Observation
pub fn observe(&self, t: i64) -> Observation
offset/is_dst/abbreviation at UTC instant t, via the POSIX rule. Robust across the year boundary:
it materialises the start/end transitions for the years around t, sorts them, and takes the state
set by the latest transition at-or-before t.
Trait Implementations§
impl Eq for TzString
impl StructuralPartialEq for TzString
Auto Trait Implementations§
impl Freeze for TzString
impl RefUnwindSafe for TzString
impl Send for TzString
impl Sync for TzString
impl Unpin for TzString
impl UnsafeUnpin for TzString
impl UnwindSafe for TzString
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