[go: up one dir, main page]

Module time

Module time 

Source
Expand description

Date and time parsing and formatting functions.

Modules§

iso8601
ISO 8601 date and time parsing and formatting functions.
rfc3339
Use the well-known RFC3339 format when serializing and deserializing an OffsetDateTime.
rfc7231
RFC 7231 date and time parsing and formatting functions.
timestamp
Treat an OffsetDateTime as a Unix timestamp for the purposes of serde.
unix_time
Unix timestamp serde helpers.

Structs§

ComponentRange
An error type indicating that a component provided to a method was out of range, causing a failure.
Duration
A span of time with nanosecond precision.
OffsetDateTime
A PrimitiveDateTime with a UtcOffset.

Functions§

diff
Get the difference between two dates.
duration_from_days
Create a duration from the number of days.
duration_from_hours
Create a duration from the number of hours.
duration_from_minutes
Create a duration from the number of minutes.
parse_last_state_change
Similar to RFC 7231, but includes milliseconds.
parse_rfc3339
RFC 3339: Date and Time on the Internet: Timestamps.
parse_rfc7231
RFC 7231: Requirements for Internet Hosts - Application and Support.
parse_unix_time
Parses the provided Unix time-stamp str into an OffsetDateTime.
to_last_state_change
Similar to preferred HTTP date format, but includes milliseconds.
to_rfc3339
RFC 3339: Date and Time on the Internet: Timestamps.
to_rfc7231
RFC 7231: Requirements for Internet Hosts - Application and Support.