[Python-Dev] proposal: add basic time type to the standard library

Guido van Rossum guido@python.org
Tue, 26 Feb 2002 15:28:24 -0500


> Does this imply leap second hell, or will we 
> simply be vague about expectations?

IMO, leap seconds should be ignored.  Time stands still during a leap
second.  Consider this a BDFL pronouncement if you wish. :-)

> I'd also like to see simple access methods for year, 
> month, day, hours, minutes, and seconds,

The timetuple() method provides access to all of these
simultaneously.  Isn't that enough?  t.year() could be spelled as
t.timetuple()[0].  I expect that usually you'd request several of
these together anyway, in order to do some fancy formatting, so the
timetuple() approach makes sense.

> with date parts
> being one based and time parts being zero based.

I'm not sure what you mean here.

--Guido van Rossum (home page: http://www.python.org/~guido/)