Skip to main content

convert_from_datetime_utc_to_timestamp

Function convert_from_datetime_utc_to_timestamp 

Source
pub fn convert_from_datetime_utc_to_timestamp(
    datetime_utc: &DateTime<Utc>,
) -> DurationSinceUnixEpoch
Expand description

It converts a DateTime::<Utc> to a timestamp. For example, the DateTime::<Utc> of the Unix Epoch will be converted to a timestamp of 0: DurationSinceUnixEpoch::ZERO.

ยงPanics

Will panic if the input time overflows the u64 type. (this will naturally happen in 584.9 billion years)