Previously, on the Mithril project we did not have a preferred format for the dates in our applications, leading to multiple formats being used.
For example when querying a certificate from an aggregator, the
initiated_at field did not specify the timezone,
timezone that could be found in the
Same problem in our databases where a date could be stored without timezone and milliseconds (ie:
in one table column and with them in another (ie:
The RFC 3339 is a widely used, easily readable, mostly numeric (no translation is needed to parse the day or the month), format. Also, it always includes the timezone meaning that our client can convert such date to their local time if needed.
- We commit to use RFC 3339 compatible date and time whenever we need to store or show a date and time.
- All dates and time must use a dedicated type in the application, ie: the
DateTime<Utc>type from chrono crate.
- This means that dates must never be stored in our types using Strings.
- Internally, we will always use the UTC timezone, to avoid useless conversions between timezones.
- Users or scripts querying dates from our applications or from our databases will be able to parse all of them using the same format.