Module date_time

Source
Expand description

Utility functions for date and date-time conversion.

Functionsยง

date_time_to_f64
Convert a date-time the number of seconds since the epoch, including fractional seconds, at a bit less than microsecond precision.
date_time_to_i64
Convert a date-time to the number of microseconds since the epoch.
date_to_f64
Convert a date to the number of days since the epoch.
date_to_i64
Convert a date to the number of days since the epoch.
i64_milli_to_date_time
Convert a number of milliseconds since the epoch back to a date.
i64_nano_to_date_time
Convert a number of nanoseconds since the epoch back to a date.
i64_to_date
Convert a number of days since the epoch back to a date.
i64_to_date_time
Convert a number of microseconds since the epoch back to a date.
utc_now
Returns the current date and time in UTC.