The author delves into the misconception surrounding POSIX time, revealing that it is not simply the number of seconds since the Unix epoch but rather a value derived from Coordinated Universal Time. Leap seconds are periodically added to UTC to align with solar days, causing disruptions in POSIX time. The author highlights the unique approach of smearing leap seconds over time for rough alignment and mentions the ongoing effort to eliminate leap seconds by 2035. Libraries like qntm’s t-a-i can assist in converting between POSIX and TAI time. The debate over time alignment and synchronization in distributed applications is also covered, emphasizing the challenges and potential solutions.
https://aphyr.com/posts/378-seconds-since-the-epoch