In message: <[EMAIL PROTECTED]> John Cowan <[EMAIL PROTECTED]> writes: : M. Warner Losh scripsit: : : > : The designers of Posix time thought it was more important to preserve : > : the property that dividing the difference between two time_t values : > : by 60, 3600, 86400 would give minutes, hours, days. : > : > That's the one property that Posix time_t does not have. The : > difference between time_t's that cross a leap second are off by one : > second, and therefore do not start with the right answer to do the : > division... : : I expressed myself badly. My point is that if you have a Posix time_t : representing 11:22:33 UTC on a certain day, and you add 86400 to that : time_t, you will get the Posix representation of 11:22:33 UTC on the : following day, whether a leap second intervenes or not. This is a valuable : property, many existing programs depended on it, and the authors of the : Posix spec preserved it at the expense of having a distinct representation : for each UTC second.
Yes. To find a second absolute time that represents the same wall time a minute/hour/day later is why posix time_t has this property. This is abstime + delta, which is a little different than the difference between two time_t. : You may call this position wrong (and I have done so), but it is : unquestionably defensible. Differences in time_t are adjusted by leapseconds. This makes naive math work for the ABSTIME+delta case, but breaks the difference case when you want an actual elapased time. It is an engineering tradeoff, but an inconvenient one for the problem domains that I tend to have to solve. Warner