Tzinfo

Struct Tzinfo 

Source
pub struct Tzinfo {
    pub timezone: String,
    pub utc_datetime: DateTime<Utc>,
    pub datetime: DateTime<FixedOffset>,
    pub dst_from: Option<DateTime<Utc>>,
    pub dst_until: Option<DateTime<Utc>>,
    pub dst_period: bool,
    pub raw_offset: isize,
    pub dst_offset: isize,
    pub utc_offset: FixedOffset,
    pub abbreviation: String,
    pub week_number: i32,
}

Fields§

§timezone: String

Timezone name

§utc_datetime: DateTime<Utc>

UTC time

§datetime: DateTime<FixedOffset>

Local time

§dst_from: Option<DateTime<Utc>>

Start of DST period

§dst_until: Option<DateTime<Utc>>

End of DST period

§dst_period: bool

Are we in DST period ?

§raw_offset: isize

Normal offset to GMT, in seconds

§dst_offset: isize

DST offset to GMT, in seconds

§utc_offset: FixedOffset

current offset to GMT, in +/-HH:MM

§abbreviation: String

Timezone abbreviation

§week_number: i32

Week number

Trait Implementations§

Source§

impl Debug for Tzinfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Tzinfo

§

impl RefUnwindSafe for Tzinfo

§

impl Send for Tzinfo

§

impl Sync for Tzinfo

§

impl Unpin for Tzinfo

§

impl UnwindSafe for Tzinfo

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.