Trait time_local::OffsetDateTimeExt
source · pub trait OffsetDateTimeExt {
// Required method
fn to_local(self) -> Result<OffsetDateTime>;
}Required Methods§
sourcefn to_local(self) -> Result<OffsetDateTime>
fn to_local(self) -> Result<OffsetDateTime>
Convenience method that calls time::OffsetDateTime::to_offset with the return value of
time::UtcOffset::current_local_offset. The current local offset is cached upon the first call. This call is
more likely to succeed before the program spawns threads. Browse the source code of
time::UtcOffset::current_local_offset to understand why.