New submission from James Henstridge <ja...@jamesh.id.au>: 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. ---------- components: Extension Modules messages: 82299 nosy: jamesh severity: normal status: open title: tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) versions: Python 2.7, Python 3.1 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5288> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com