[ntp:hackers] Leap second support in versions prior to 4.2.6

Mike S mikes at flatsurface.com
Mon Jun 4 22:32:27 UTC 2012


On 6/4/2012 5:24 PM, Warner Losh wrote:
>
> On Jun 4, 2012, at 3:14 PM, Mike S wrote:
>
>> Please try to be consistent. You just finished arguing the problems
>> caused to long-running programs which didn't reread zoneinfo files,
>> something not needed if using time_t
>
> Only if time_t is obeying POSIX rules.  When you are using the right
> files, you are no longer obeying POSIX rules.

Yet, you started all of this with some cruft about "non-uniform radix." 
Which, of course, appear in the modern calendar independent of leap 
seconds. Days in a month, hours in a day, days in a year, all can change.

You then argued that it was really the unpredictability of leap seconds 
which were the problem. With POSIX, time_t is not monotonic, and does 
not generate unique or predictable values. With "right" timekeeping, 
none of those issues exist.

You claimed that long running programs would have problems with "right" 
timekeeping because they don't re-read the zoneinfo files, ignoring the 
frequent changes called for by political summertime changes. You then 
changed to claiming that those programs didn't use zoneinfo, but time_t, 
an apparent defense of the unpredictability of POSIX time_t over the 
logical, predictable nature of "right" time_t.

About that time, you claimed it was I who was arguing non-sequiturs. 
Meh. Forgive me for not accurately predicting which tangent your 
argument would next take.

The problem with POSIX timekeeping is that it is irreconcilably 
inconsistent, it requires 86400 second days, but also calls for time to 
be kept in UTC.

If an application is properly written for POSIX, it will deal with the 
POSIX issues, be able to deal with repetitive time_t values, understand 
standard UTC 61 (or 59) second minutes, and all is well. If it doesn't 
do those things, and proper timekeeping is important, it's simply not 
well written code.

If someone doesn't want to deal with all of the problems POSIX has with 
proper timekeeping, they can simply use "right" timekeeping, keep their 
system up to date, and be on their way.


More information about the hackers mailing list