pub(crate) struct UtcDateTime {
pub(crate) year: i32,
pub(crate) month: u8,
pub(crate) month_day: u8,
pub(crate) hour: u8,
pub(crate) minute: u8,
pub(crate) second: u8,
}
Expand description
UTC date time exprimed in the proleptic gregorian calendar
Fields§
§year: i32
Year
month: u8
Month in [1, 12]
month_day: u8
Day of the month in [1, 31]
hour: u8
Hours since midnight in [0, 23]
minute: u8
Minutes in [0, 59]
second: u8
Seconds in [0, 60]
, with a possible leap second
Implementations§
source§impl UtcDateTime
impl UtcDateTime
sourcepub(crate) fn from_timespec(unix_time: i64) -> Result<Self, Error>
pub(crate) fn from_timespec(unix_time: i64) -> Result<Self, Error>
Construct a UTC date time from a Unix time in seconds and nanoseconds
Trait Implementations§
source§impl Clone for UtcDateTime
impl Clone for UtcDateTime
source§fn clone(&self) -> UtcDateTime
fn clone(&self) -> UtcDateTime
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for UtcDateTime
impl Debug for UtcDateTime
source§impl Ord for UtcDateTime
impl Ord for UtcDateTime
source§fn cmp(&self, other: &UtcDateTime) -> Ordering
fn cmp(&self, other: &UtcDateTime) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for UtcDateTime
impl PartialEq for UtcDateTime
source§impl PartialOrd for UtcDateTime
impl PartialOrd for UtcDateTime
impl Copy for UtcDateTime
impl Eq for UtcDateTime
impl StructuralPartialEq for UtcDateTime
Auto Trait Implementations§
impl Freeze for UtcDateTime
impl RefUnwindSafe for UtcDateTime
impl Send for UtcDateTime
impl Sync for UtcDateTime
impl Unpin for UtcDateTime
impl UnwindSafe for UtcDateTime
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)