FW: Definition of time_t changed from signed to unsigned...

Olson, Arthur David (NIH/NCI) olsona at dc37a.nci.nih.gov
Thu Aug 19 14:33:57 UTC 2004

Susan Richards is not on the time zone mailing list; direct replies


-----Original Message-----
From: Susan Richards [mailto:cj_richards at hotmail.com] 
Sent: Wednesday, August 18, 2004 12:58 PM
To: clive at demon.net; guy at alum.mit.edu
Cc: tz at lecserver.nci.nih.gov
Subject: Re: Definition of time_t changed from signed to unsigned...

Hello All,

I have another (potentially stupid) question regarding the interaction of 
NTP, leap seconds and the timezone database:

As I've been going through the TZ code, I've seen the leap correction code. 
It appears that the adjustment for leap seconds is made when converting the 
UTC system time (which includes leap seconds) to POSIX (which does not) or 
visa versa.

So my understanding is:-
UTC   - includes leap seconds
POSIX - no leap seconds included.

Is this correct?

If my system is maintaining UTC (as set by some NTP server), and running the

timezone database code, then are my following assumptions correct:

1) The result of calling time(0) is UTC (as maintained by NTP) and does 
include leap seconds.
2) The date & time displayed using "date" also takes into account leap 
3) If I want to report POSIX time, I need to call time2posix().

Thanks for your time.

From: "Clive D.W. Feather" <clive at demon.net>
To: Guy Harris <guy at alum.mit.edu>
CC: Chris Richards <cj_richards at hotmail.com>, Tz 
<tz at lecserver.nci.nih.gov>
Subject: Re: Definition of time_t changed from signed to unsigned...
Date: Tue, 20 Jul 2004 09:30:31 +0100

Guy Harris said:
>>> If you can, I'd change the time_t typedef in the OS. >>
Changing an OS-supplied definition is EXTREMELY DUMB. You're 
>> breaking the OS interfaces.
> When he said "I am in the process of upgrading the kernel version 
on a
> platform that I
> work on.", it sounded as if he might be one of the developers *of*

> platform

In which case it's a very different kettle of fish, I agree.

I read the original thread as suggesting just changing the header file
available to user code and reacted accordingly - that remains extremely
dumb. Changing the OS's own definitions is, of course, completely different.

If I've reacted over nothing, I apologise to all concerned.

Clive D.W. Feather  | Work:  <clive at demon.net>   | Tel:    +44 20 8495

Internet Expert     | Home:  <clive at davros.org>  | Fax:    +44 870 051

Demon Internet      | WWW: http://www.davros.org | Mobile: +44 7973 377646
Thus plc            |                            |

Is your PC infected? Get a FREE online computer virus scan from McAfee(r) 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

More information about the tz mailing list