ADR 3: Represent datetime in UTC¶
Status¶
proposed
Context¶
Local time is not adequate for representing time on a server. A server could be in a different timezone as the consumer, but a consistent reference time is needed.
Decision¶
Time is stored in UTC This can be accomplished via datetime2 in the database. If only a date is needed, a date-centric type such as 'date' in SQL will suffice.
The API returns the value in UTC ISO 8601
Consequences¶
Log aggregation can use UTC to ease correlation.
A consumer may translate the returned ISO 8601 to local time as needed.