Parsing ISO date/time strings - where did the parser go?

Roy Smith roy at panix.com
Thu Sep 6 19:44:38 EDT 2012


In article <mailman.325.1346961282.27098.python-list at python.org>,
 Dave Angel <d at davea.name> wrote:

> For working with datetime, see
>     http://docs.python.org/library/datetime.html#datetime.datetime
> 
> and look up  datetime.strptime()

strptime has two problems.

One is that it's a pain to use (you have to look up all those 
inscrutable %-thingies every time).

The second is that it doesn't always work.  To correctly parse an 
ISO-8601 string, you need '%z', which isn't supported on all platforms.

The third is that I never use methods I can't figure out how to 
pronounce.



More information about the Python-list mailing list