Skip to main content

from_local

Function from_local 

Source
pub fn from_local(
    transitions: &[ZoneTransition],
    base_offset: i32,
    civil: CivilDateTime,
    fold: Fold,
) -> i64
Expand description

The UTC instant of a local civil date-time in a zone. A local time normally maps to exactly one instant; in a DST fold it maps to two (resolved by fold); in a DST gap it maps to none (the boundary instants are returned, fold choosing which). This is the offset-dependent inverse of to_local, solved by testing each candidate offset for self-consistency.