Alternative to strptime()?

Dan Schmidt dfan at thecia.net
Mon Sep 11 08:30:50 EDT 2000


"Mio Nino Marquez" <mionino at d1.com.sg> writes:

| We have a problem whereby we'd like to convert a date-formatted
| string into a Tuple so that we can pass it to either
| time.localtime() or time.strftime() Seems like strptime() is the
| answer, but strptime() appears to be not working in Win32. Is there
| any other way to do it?

I bet rfc822.parsedate_tz() will do the job for you.

I don't know whether it's absolutely guaranteed to parse exactly the
same strings that time.strptime() is, but it hasn't failed me yet.

If it is guaranteed, maybe it should be made the default implementation
of strptime() on Windows?

-- 
                 Dan Schmidt | http://www.dfan.org
Honest Bob CD now available! | http://www.dfan.org/honestbob/cd.html



More information about the Python-list mailing list