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
tm_sec: c_int
Seconds
tm_min: c_int
Minutes
tm_hour: c_int
Hours
tm_mday: c_int
Day of the month (1-31)
tm_mon: c_int
Months since January (0-11)
tm_year: c_int
Years since YEAR_EPOCH
(1900)
tm_wday: c_int
unused, should be set to 0
tm_yday: c_int
unused, should be set to 0
tm_isdst: c_int
unused, should be set to 0
Trait Implementations
impl Debug for RtcTime
[src]
impl Copy for RtcTime
[src]
impl Clone for RtcTime
[src]
fn clone(&self) -> RtcTime
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for RtcTime
[src]
impl Eq for RtcTime
[src]
impl PartialEq for RtcTime
[src]
fn eq(&self, __arg_0: &RtcTime) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &RtcTime) -> bool
[src]
This method tests for !=
.
impl From<NaiveDateTime> for RtcTime
[src]
fn from(ct: NaiveDateTime) -> RtcTime
[src]
Performs the conversion.