Skip to main content

Module local_time

Module local_time 

Source
Expand description

Resolving wall clock (“local”) readings to instants.

Reading a NaiveDateTime as a wall clock time in an IANA timezone does not always identify a unique instant, because of daylight savings transitions. Everything that has to make that choice – the cast kernel and the string parser – goes through resolve_local_offset so that the two cannot drift apart.

Re-exports§

use chrono::DateTime; 🔒
use chrono::NaiveDateTime; 🔒
use chrono::Offset; 🔒
use chrono::TimeDelta; 🔒
use chrono::TimeZone; 🔒

Functions§

resolve_local_datetime 🔒
Reads local as a wall clock time in tz, resolving daylight savings ambiguities and gaps as described on resolve_local_offset.
resolve_local_offset 🔒
Returns the offset to use when interpreting local as a wall clock reading in tz, or None if it cannot be resolved.