Struct hwclock::RtcTime [] [src]

#[repr(C)]
pub struct RtcTime { 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, }

Linux struct rtc_time wrapper

This structure is slightly shorter than other commonly used struct tm*. It is assumed that the Rtc is kept at UTC.

Note that the resolution of the time struct is only seconds.

Conversion from and to chrono::NaiveDateTime is supported, any resolution beyond seconds will silently be discarded without rounding.

Fields

Seconds

Minutes

Hours

Day of the month (1-31)

Months since January (0-11)

Years since YEAR_EPOCH (1900)

unused, should be set to 0

unused, should be set to 0

unused, should be set to 0

Trait Implementations

impl Debug for RtcTime
[src]

[src]

Formats the value using the given formatter.

impl Copy for RtcTime
[src]

impl Clone for RtcTime
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for RtcTime
[src]

[src]

Returns the "default value" for a type. Read more

impl Eq for RtcTime
[src]

impl PartialEq for RtcTime
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl From<NaiveDateTime> for RtcTime
[src]

[src]

Performs the conversion.