This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jamesh
Recipients jamesh
Date 2009-02-17.04:33:23
SpamBayes Score 3.4024528e-10
Marked as misclassified No
Message-id <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za>
In-reply-to
Content
The datetime module does not support time zones whose offset from UTC is
not an integer number of minutes.

The Olson time zone database (used by most UNIX systems and Mac OS X)
has a number of time zones with historic offsets that use second
resolution (from before those locations switched to a rounded offset
from GMT).

If you are working purely with the Python date time module, you can
round these offsets to whole numbers of minutes and get consistent
results (this is what the pytz module does), there are problems if you
want to interact with other programs using the Olson database.

As an example, PostgreSQL can return dates with sub-minute UTC offsets
and it would be nice to be able to represent them exactly.

The documentation doesn't explain why offsets need to be a whole number
of minutes, and the interface (returning timedeltas) doesn't look like
it'd need changing to support second offsets.  I wouldn't expect any
more complexity in the code to support them either.
History
Date User Action Args
2009-02-17 04:33:27jameshsetrecipients: + jamesh
2009-02-17 04:33:26jameshsetmessageid: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za>
2009-02-17 04:33:24jameshlinkissue5288 messages
2009-02-17 04:33:23jameshcreate