Re:Storing UTC is not a silver bullet
by ademarre on Wednesday March 27, 2019 @12:23PM
(#19502555)
Exactly. It's usually best to specify end times exclusively, and not just for leap seconds; it's easier to program in general. If your clock has sub-second granularity, then you can end up with a time value like 23:59:59.123. Which will require some truncation before it can be compared like t ≤ 23:59:59. If you use exclusive end times, you can do the comparison directly; 2016-12-31 23:59:59.123 < 2017-01-01 00:00:00. The key is that now we have an end date-time that actually specifies a true instant in time, and isn't an interval in and of itself.
[ Parent
| on HN ]
Re:Storing UTC is not a silver bullet
by BillinghamJ on Wednesday March 27, 2019 @12:49PM
(#19502882)
For that very reason, for start/end policy times, we store them aligned to the second - no fractional seconds allowed. There'd be no legal basis for that anyway.
Obviously for actual timestamps - e.g. created at/updated at times - we do store a point-in-time with fractional seconds.