pub enum TimezoneInfo {
Iana(Tz),
Fixed(FixedOffset),
}Expand description
Represents either an IANA timezone or a fixed offset.
Variants§
Iana(Tz)
Fixed(FixedOffset)
Implementations§
Source§impl TimezoneInfo
impl TimezoneInfo
Sourcepub fn datetime_from_timestamp(
&self,
ts: &Timestamp,
) -> Option<DateTime<FixedOffset>>
pub fn datetime_from_timestamp( &self, ts: &Timestamp, ) -> Option<DateTime<FixedOffset>>
Convert a UTC timestamp to a DateTime in this timezone.
Auto Trait Implementations§
impl Freeze for TimezoneInfo
impl RefUnwindSafe for TimezoneInfo
impl Send for TimezoneInfo
impl Sync for TimezoneInfo
impl Unpin for TimezoneInfo
impl UnsafeUnpin for TimezoneInfo
impl UnwindSafe for TimezoneInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more