Closed
Description
Issue
Also, at least two dates formats exist in the application:
- With timezone, ie:
2023-06-13T16:35:25.104893012Z
- 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:
- Choose and use a standard format when we serialize dates: The RFC 3339 seems perfect for that.
- 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