Skip to main content

convert_from_timestamp_to_datetime_utc

Function convert_from_timestamp_to_datetime_utc 

Source
pub fn convert_from_timestamp_to_datetime_utc(
    duration: DurationSinceUnixEpoch,
) -> DateTime<Utc>
Expand description

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

ยงPanics

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