pub enum DateTime {
Local(OffsetDateTime),
Utc(OffsetDateTime),
}
Variants§
Local(OffsetDateTime)
Utc(OffsetDateTime)
Implementations§
source§impl DateTime
impl DateTime
pub fn now() -> Self
pub fn offset_datetime() -> OffsetDateTime
pub fn local_now() -> Result<Self, Box<dyn Error>>
pub fn timestamp_2_utc(time_stamp: i64) -> SdResult<Self>
pub fn to_rfc2822(&self) -> String
pub fn to_rfc3339(&self) -> String
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