[英]What is the best way to convert a zope DateTime object into Python datetime object?
I need to convert a zope 2 DateTime object into a Python datetime object. 我需要将zope 2 DateTime对象转换为Python datetime对象。 What is the best way to do that? 最好的方法是什么? Thanks, Erika 谢谢,Erika
较新的DateTime实现(2.11及更高版本)具有asdatetime
方法,该方法返回python datetime.datetime实例:
modernthingy = zopethingy.asdatetime()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.