pub struct DateTime {
pub year: u32,
pub month: u8,
pub day: u8,
pub hour: u8,
pub minute: u8,
pub second: u8,
pub millisecond: u16,
pub timezone: TimeZone,
}Expand description
DateTime is a Unix and UTC conversion util.
Example of converting a Unix to a DateTime UTC.
use embedded_utils::time::{DateTime, TimeZone};
let datetime = DateTime::from_unix_millis(1704067199998, TimeZone::UTC);
println!("datetime: {:?}", datetime);Fields§
§year: u32Year
month: u8Month
day: u8Day
hour: u8Hour
minute: u8Minute
second: u8Second
millisecond: u16Millisecond
timezone: TimeZoneTimezone
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DateTime
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin 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