News for hackers. Stuff that matters.
Re:Leap second hiatus by forgotmypw17 on Thursday November 19, 2020 @11:56AM (#25151440)
How does TAI relate to Epoch time?

More and more I use Epoch time for most things just because of how convenient it is.

I rarely need sub-second granularity, and it's just one number, so it's sortable, math-able, etc.

Then whoever is doing the display can convert it any way they want to.

Re:Leap second hiatus by revicon on Thursday November 19, 2020 @01:44PM (#25152849)
Remember that your code needs to account for the possibility of a negative leap second, meaning if you're using epoch time for timestamps you could have an instance that an event that happened after a previous one could be stamped as having happened before it instead.

https://en.wikipedia.org/wiki/Leap_second

Edit: Actually I was slightly wrong, in the event of a leap second, we would repeat the same second twice.

Re:Leap second hiatus by forgotmypw17 on Thursday November 19, 2020 @03:31PM (#25153992)
Thank you for the heads-up!

I try to write code loose enough that this would not be a problem. :)