pub struct DateTime { /* private fields */ }Expand description
Date time associated to a local time type, exprimed in the proleptic gregorian calendar
Implementations
sourceimpl DateTime
impl DateTime
sourcepub fn local_time_type(&self) -> &LocalTimeType
pub fn local_time_type(&self) -> &LocalTimeType
Returns local time type
sourcepub fn now(time_zone: &TimeZone) -> Result<Self>
pub fn now(time_zone: &TimeZone) -> Result<Self>
Returns the current date time associated to the specified time zone
sourcepub fn from_utc_date_time(
time_zone: &TimeZone,
utc_date_time: UtcDateTime
) -> Result<Self>
pub fn from_utc_date_time(
time_zone: &TimeZone,
utc_date_time: UtcDateTime
) -> Result<Self>
Construct date time from a time zone and an UTC date time
sourcepub fn from_unix_time(time_zone: &TimeZone, unix_time: i64) -> Result<Self>
pub fn from_unix_time(time_zone: &TimeZone, unix_time: i64) -> Result<Self>
Construct date time from a time zone and an unix time in seconds
Trait Implementations
impl Eq for DateTime
impl StructuralEq for DateTime
impl StructuralPartialEq for DateTime
Auto Trait Implementations
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin for DateTime
impl UnwindSafe for DateTime
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more