pub trait GetTimezone {
// Required method
fn tz_offset(&self) -> TzOffset;
}Expand description
A helper trait for getting timezone information from some value. (Especially chrono::DateTime or chrono::NaiveDateTime.)
Implementations for the chrono types are included with feature = ["chrono"].
Not implemented on DateTime because this is only used as a bound on impl<T> From<T> for DateTime
implementations.
Required Methods§
Implementations on Foreign Types§
Source§impl GetTimezone for DateTime<TzOffset>
Available on crate feature chrono only.This implementation maps to an EDTF timestamp with a timezone offset like +04:00.
impl GetTimezone for DateTime<TzOffset>
Available on crate feature
chrono only.This implementation maps to an EDTF timestamp with a timezone offset like +04:00.
Source§impl GetTimezone for DateTime<FixedOffset>
Available on crate feature chrono only.This implementation maps to an EDTF timestamp with a timezone offset like +04:00.
impl GetTimezone for DateTime<FixedOffset>
Available on crate feature
chrono only.This implementation maps to an EDTF timestamp with a timezone offset like +04:00.
Source§impl GetTimezone for DateTime<Utc>
Available on crate feature chrono only.This implementation maps to an EDTF timestamp with a Z on the end.
impl GetTimezone for DateTime<Utc>
Available on crate feature
chrono only.This implementation maps to an EDTF timestamp with a Z on the end.
Source§impl GetTimezone for NaiveDate
Available on crate feature chrono only.This implementation maps to an EDTF timestamp without any timezone information attached.
impl GetTimezone for NaiveDate
Available on crate feature
chrono only.This implementation maps to an EDTF timestamp without any timezone information attached.