pub struct DateUtils;Expand description
Date helpers.
Implementations§
Source§impl DateUtils
impl DateUtils
Sourcepub fn date_time_from_unix_time(
unix_time: u64,
) -> Result<SystemTime, SteamError>
pub fn date_time_from_unix_time( unix_time: u64, ) -> Result<SystemTime, SteamError>
Converts a Unix timestamp (seconds) to a point in time. Timestamps after the year 9999 are an error.
Sourcepub fn date_time_to_unix_time(time: SystemTime) -> Result<u64, SteamError>
pub fn date_time_to_unix_time(time: SystemTime) -> Result<u64, SteamError>
Converts a point in time to a Unix timestamp (seconds), truncating any fraction. Times before the epoch are an error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DateUtils
impl RefUnwindSafe for DateUtils
impl Send for DateUtils
impl Sync for DateUtils
impl Unpin for DateUtils
impl UnsafeUnpin for DateUtils
impl UnwindSafe for DateUtils
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