On Mon, 7 Mar 2011, Joe Gwinn wrote:

Yes, POSIX does have a progress rule. It adds one second per SI second to the Seconds Since the Epoch counter, and converts this count to something resembling UTC (but having no leap seconds).

Hi Joe,

If I understand you correctly, this is just not right. POSIX does not add one second per SI second to the time_t counter. E.g., between UTC 12-31-2005 23:59:59 and UTC 1-1-2005 00:00:00, there were two SI seconds. A POSIX system's gettimeofday() only increased tp->tv_sec by 1.

Here are the relevant excerpts from SUS:

XXX

If the year is >=1970 and the value is non-negative, the value is related to a Coordinated Universal Time name according to the C-language expression, where tm_sec, tm_min, tm_hour, tm_yday, and tm_year are all integer types:

tm_sec + tm_min*60 + tm_hour*3600 + tm_yday*86400 +
    (tm_year-70)*31536000 + ((tm_year-69)/4)*86400 -
    ((tm_year-1)/100)*86400 + ((tm_year+299)/400)*86400

The relationship between the actual time of day and the current value for seconds since the Epoch is unspecified.

How any changes to the value of seconds since the Epoch are made to align to a desired relationship with the current actual time is implementation-defined.

XXX

Most systems' notion of "time" is that of a continuously increasing value, so this value should increase even during leap seconds.

XXX

Note that as a practical consequence of this, the length of a second as measured by some external standard is not specified. This unspecified second is nominally equal to an International System (SI) second in duration. Applications must be matched to a system that provides the particular handling of external time in the way required by the application.

XXX

-Keith
_______________________________________________
LEAPSECS mailing list
[email protected]
http://six.pairlist.net/mailman/listinfo/leapsecs

Reply via email to