I need to convert a zope 2 DateTime object into a Python datetime object. What is the best way to do that? Thanks, Erika
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
If you mean this one
then reverse is
Newer DateTime implementations (2.11 and up) have a
asdatetime
method that returns a python datetime.datetime instance:The
datetime
instance is timezone-naive; if you need to support timezones (as Zope2'sDateTime
does), I recommend third-party extension package pytz.