Skip to content

tick: refine the MIN, MAX values for timestamps in fmt module #167

@martintmk

Description

@martintmk

The tick crate exposes the following formats for SystemTime:

  • Iso8601
  • Rfc2822
  • UnixSeconds

All formats above expose MIN and MAX values. Currently, the MIN points to UNIX_EPOCH while the underlying jiff crate that we are using for parsing and serialization allows even lower min values.

Make the following changes across all 3 formats:

  • Update the MIN field value to refer to a MIN value as of 1 January 0001 00:00:00 UTC. Note: while jiff supports even lower min values, the Rfc2822 format cannot display these. So it's better that we just align to 1 January 0001 00:00:00 UTC as it is supported by all 3 formats and for the purpose of system time handling it should be sufficient.
  • Introduce UNIX_EPOCH field that that refers to UNICH epoch

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions