>>>>> "BB" == Buddha Buck <[EMAIL PROTECTED]> writes:

BB> I am assuming that the system clocks are set accurately to UTC (or some 
BB> derivative, like (US) Eastern Standard Time).  UTC is what time-servers 
BB> report. UTC has leap seconds, which are inserted (or, theoretically, 
BB> deleted) at the end of December 31st and June 30th, as needed.

Oh, I was under the impression that they only occur at Dec 31.

BB> This means that 86400 seconds (one day) after 2000 Dec 31, 12:00:00 UTC 
BB> is not necessarily 2001 Jan 1, 12:00:00 -- it could be 11:59:59 or 
BB> 12:00:01 as well.  And there is no way to know that ahead of time.

Hmm, there are negative leap seconds?

BB> If we have to pick and epoch in an OS-neutral way, I think I for one 
BB> would be happy with something like this in the docs for the time 
BB> functions:

BB> --------------------
BB> All date and time functions, unless otherwise documented, assume the 
BB> use of the International Atomic Time (TAI) timescale. TAI differs from 
BB> standard time (UTC) in that TAI does not have "leapseconds".

BB> It is likely that the OS clock was set to UTC, not TAI.  This slight 
BB> difference (22 seconds as of 2000) should not cause any problems unless 
BB> date computations of over 6-months with second accuracy are needed.

BB> time() returns the number of seconds elapsed since the beginning of the 
BB> International Atomic Time (TAI) timescale, 00:00:00 UTC 1 January 1958.

BB> date($) returns a year-month-day-hour-minute-second representation of 
BB> the time passed to it (in seconds since the TAI epoch).  The 
BB> representation assumes the TAI timescale.
BB> ---------------------

So if I understand you, the instantaneous time is correct. But
calculating backwards to what the instantaneous time would have been,
or calculating what the instanataneous time will be will not work.

But your blurb would be a lie. How would one ensure the correct
difference to the TAI? And what would be the translation to the
system time?

What do we do with stat(), utime(), sleep(), select(), events, etc.

<chaim>
-- 
Chaim Frenkel                                        Nonlinear Knowledge, Inc.
[EMAIL PROTECTED]                                               +1-718-236-0183

Reply via email to