|
|
Log in / Subscribe / Register

A GPSD time warp

A GPSD time warp

Posted Aug 5, 2021 18:41 UTC (Thu) by NYKevin (subscriber, #129325)
In reply to: A GPSD time warp by ncm
Parent article: A GPSD time warp

My personal opinion is that it's the worst solution, except for all of the other solutions:

* Unix time can't represent 23:59:60, so doing things as specified by UTC is impossible. You have to deviate from UTC in one fashion or another, or else you have to completely tear out and replace the entire POSIX time API. The question is *not* "Should we deviate from UTC?" because we have no choice. The question instead is "*How* shall we deviate from UTC?"
* Jumping time backwards is notorious for breaking things, because you get non-monotonic timestamps. Testing for those bugs is hard. Fixing those bugs is also hard.
* Yes, CLOCK_MONOTONIC exists. You get a gold star if you remembered to use it everywhere. But did you audit all of the library code in your entire sprawling application? What about all of the daemons and other services that it relies on? Are you absolutely sure that every single time anyone asks for any timestamp, in any part of the system whatsoever, they always scrupulously observe the distinction between CLOCK_MONOTONIC and CLOCK_REALTIME, and never inadvertently assume that the latter will be monotonic?
* In practice, many sysadmins were already using ntpd -x to get the same effect, but worse (because it would only start slewing after the leap second, and do so in a less predictable way over a shorter period of time, with the result that the clock gets way wonkier than under "proper" leap smearing).


The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:

Note: you can avoid this step in the future by logging into your LWN account.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds