Skip to content

Dates format is not standardized #946

Closed
@jpraynaud

Description

@jpraynaud

Issue

Also, at least two dates formats exist in the application:

  1. With timezone, ie: 2023-06-13T16:35:25.104893012Z
  2. Without timezone, ie: 2023-06-13 16:35:28

One of the best example is the Certificate: The initiated_at don't specify the timeonz while the sealed_at dates specify it:

"initiated_at": "2023-05-26T00:02:23",
"sealed_at": "2023-05-26T00:03:23.998753492Z",

They both should use specify a timezone and even better use the same timezone.

This is a problem since it means that clients querying our Aggregator or our SQLite databases have to check themself which field use which format.

To standardize all of this we need to:

  1. Choose and use a standard format when we serialize dates: The RFC 3339 seems perfect for that.
  2. Stop using strings to store dates in our datatypes and use a dedicated type: the DateTime from the chrono crate is also perfect, in addition it have dedicated methods to convert from or to rfc 3339 format and it have a feature that allow to use thoses types for serde (de)serialization (using the rfc 3339 format too).

Note

In order to do this we will have to change datatypes that are used for some to compute some of our hashes, meaning that those hashes will changes, so:

We will need to re-genesis the certificate chains once this issue is merged

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions