time::serde

Module timestamp

source
Expand description

Treat an OffsetDateTime as a Unix timestamp for the purposes of serde.

Use this module in combination with serde’s #[with] attribute.

When deserializing, the offset is assumed to be UTC.

Modules§

Functions§

  • Deserialize an OffsetDateTime from its Unix timestamp
  • Serialize an OffsetDateTime as its Unix timestamp