pub enum AmbiguousOffset {
Unambiguous {
offset: Offset,
},
Gap {
before: Offset,
after: Offset,
},
Fold {
before: Offset,
after: Offset,
},
}Expand description
A possibly ambiguous Offset.
One of three possibilities encoded by this type occurs when converting a civil datetime into a specific instant in time. In rare cases, the civil datetime can fall into a gap or a fold, in which case, one of two offsets could be applicable. Or, perhaps, neither. Callers must decide how best to handle these cases.
Variants§
Unambiguous
The offset for a particular civil datetime and time zone is unambiguous.
This is the overwhelmingly common case. In general, the only time this case does not occur is when there is a transition to a different time zone (rare) or to/from daylight saving time (occurs for 1 hour twice in year in many geographic locations).
Fields
Gap
The offset for a particular civil datetime and time zone is ambiguous because there is a gap.
This most commonly occurs when a civil datetime corresponds to an hour that was “skipped” in a jump to DST (daylight saving time).
Fields
Fold
The offset for a particular civil datetime and time zone is ambiguous because there is a fold.
This most commonly occurs when a civil datetime corresponds to an hour that was “repeated” in a jump to standard time from DST (daylight saving time).
Trait Implementations§
Source§impl Clone for AmbiguousOffset
impl Clone for AmbiguousOffset
Source§fn clone(&self) -> AmbiguousOffset
fn clone(&self) -> AmbiguousOffset
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more