Struct libtz_sys::Tm

source ·
#[repr(C)]
pub struct Tm { pub tm_sec: c_int, pub tm_min: c_int, pub tm_hour: c_int, pub tm_mday: c_int, pub tm_mon: c_int, pub tm_year: c_int, pub tm_wday: c_int, pub tm_yday: c_int, pub tm_isdst: c_int, pub tm_gmtoff: c_long, pub tm_zone: *const c_char, }
Expand description

A broken down time representation, logically equivalent to struct tm in unix.

Note: This is libtz’s struct tm and doesn’t necessarily match the system’s in terms of member ordering.

Reference: https://pubs.opengroup.org/onlinepubs/7908799/xsh/time.h.html

Fields§

§tm_sec: c_int

Seconds [0, 60]

§tm_min: c_int

Minutes [0, 59]

§tm_hour: c_int

Hour [0, 23]

§tm_mday: c_int

Day of the month [1, 31]

§tm_mon: c_int

Month [0, 11] (January = 0)

§tm_year: c_int

Year minus 1900

§tm_wday: c_int

Day of the week [0, 6] (Sunday = 0)

§tm_yday: c_int

Day of the year [0, 365] (Jan/01 = 0)

§tm_isdst: c_int

Daylight savings flag

§tm_gmtoff: c_long

Seconds East of UTC

§tm_zone: *const c_char

Timezone abbreviation

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.