pub struct DateTime {
pub year: i64,
pub month: u32,
pub day: u32,
pub hour: u32,
pub minute: u32,
pub second: u32,
pub weekday: u32,
}Expand description
A civil date and time in UTC.
UTC and not local time on purpose: a schedule that silently shifts by an hour twice a year, differently on every machine in a cluster, is a bug generator. An application that wants local time can offset the expression.
Fields§
§year: i64§month: u321–12.
day: u321–31.
hour: u32§minute: u32§second: u32§weekday: u320 = Sunday, matching cron’s numbering rather than ISO’s.
Trait Implementations§
impl Copy for DateTime
impl Eq for DateTime
impl StructuralPartialEq for DateTime
Auto Trait Implementations§
impl Freeze for DateTime
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin for DateTime
impl UnsafeUnpin for DateTime
impl UnwindSafe for DateTime
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