[Zope3-dev] time.strptime doesn't exist in 2.2 everywhere

Stephan Richter stephan.richter@tufts.edu
Wed, 08 Jan 2003 16:23:40 -0500


On Wednesday 08 January 2003 15:15, Tim Peters wrote:
> The problem is that strptime isn't an ANSI C function, so its availability
> is platform-dependent.  Python 2.3 adds a Python implementation of strptime
> so that the function is available everywhere, but before 2.3 (incluing
> 2.2.2) strptime is only available under most (not all) flavors of Unix.
>
> I believe the only use of strptime in Zope3 is in the locales.py line
> listed above in the traceback, so there are probably many ways around this.
> Somebody who understands this subsystem should pick one <wink>.

I wrote it, so I would like to fix it. How can I do this? Should I make a 
monkey patch for Python2.2 or what is the best solution? I mean I know 
exactely how the datetime string looks like, so manual parsing would not be 
too bad, but a bit cumbersome.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training