John Nagle <na...@animats.com> writes: > I want to parse standard ISO date/time strings such as > > 2012-09-09T18:00:00-07:00 > > into Python "datetime" objects.
Consider whether RFC 3339 might be a more suitable format. It is a subset of ISO 8601 extended format. Some of the restrictions are Year must be 4 digits Fraction separator is period, not comma All components including time-offset are mandatory, except for time-secfrac time-minute in time-offset is not optional, must use ±hh:mm or Z Some latitude is allowed T may be replaced by e.g. space Extra feature time-offset of -00:00 means UTC but local time is unknown -- Pete Forman -- http://mail.python.org/mailman/listinfo/python-list