mktime() like function to produce GMT?

M.-A. Lemburg mal at lemburg.com
Tue May 4 16:23:58 EDT 1999


Guido van Rossum wrote:
> 
> "M.-A. Lemburg" <mal at lemburg.com> writes:
> > The last short sentence pretty nicely covers up the problems with timegm()
> > :-) "POSIX algorithm" means that leap seconds are not accounted for.
> 
> And what's wrong with that?  The Unix time is just as much an
> *encoding* of time values as any other.  Few clocks in the world are
> accurate enough to care about leap seconds.  The rest of us
> occasionally synchronize with a master clock.  I don't care about leap
> seconds and never will.

Nothing's wrong with that... it's just that on platforms that use a
leap seconds aware standard, you'll get strange timezone
offsets when comparing ticks (Unix time values) for local time and
the ones calculated using the POSIX timegm() function.

I would assume that astronomers and other people interested in
absolute time do care about these subtle differences. For things
like rfc822 date headers this is, of course, completely unnecessary.

Here a nice pointer with lots of information on the subject:

	http://www.bldrdoc.gov/timefreq/glossary.htm

[BTW, could it be that you didn't see the smiley in my reply :-]

-- 
Marc-Andre Lemburg
______________________________________________________________________
Y2000:                                            Y2000: 241 days left
Business:                                      http://www.lemburg.com/
Python Pages:                 http://starship.python.net/crew/lemburg/





More information about the Python-list mailing list