concord
concord copied to clipboard
Timestamp resolution
Currently, the API returns timestamps with millisecond resolution (0.999) while the DB stores timestamps with microseconds (0.999999). This may cause inconsistencies for some queries, e.g.
DB value: 2021-06-30T18:32:06.561333-04
DB value received as an API object: 2021-06-30T18:32:06.561-04
We need to choose:
- truncate the timestamps before inserting into the DB;
- or extend the API timestamp resolution to microseconds.
Truncating before insert requires updating the existing data otherwise the queries with CREATED_AT may fail (e.g. all queries that are using tables partitioned by INSTANCE_ID + CREATED_AT. Which might not be practical for large Concord installations.
Increasing the timestamp resolution in the API can potentially break some 3rd-party clients, e.g. clients that parse ISO 8601 / RFC 3336 expecting only millisecond precision.