Open
Description
Chrono seems to treat UTC as the canonical/internal time representation, but this is hazardous because UTC includes leap seconds.
In your Jan 13 rustlog you bring up four issues regarding time zones:
- There is no reliable way to handle the local date in the future.
- There can exist a local date which occurred in two or more instants.
- There can exist a local date which never has been occurred.
- The conversion process itself is seriously annoying and easy to make a mistake.
The problem with UTC is that all four of those are true of it as well:
- Future leap seconds can be declared at any time, invalidating calculations of future datetimes
- Leap seconds as they have occurred so far result in a second that happens twice
- Leap seconds can (and eventually will) go in the other direction, resulting in seconds that never happen
- Leap second handling is oh so painfully annoying and easy to get wrong
I would suggest instead using TAI, which is the basis of UTC. (UTC is TAI with leap seconds)
Metadata
Metadata
Assignees
Labels
No labels