Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
除了本地化日期外,如何在 PloneFormGen 邮件模板中获取 ISO 日期 (2010-01-01 00:00:00)?
您想要当前日期/时间,还是通过表单提交的日期/时间?
无论如何,如果你有一个 Zope DateTime 实例,你可以获得这样的 ISO 表示:
>>> mydate.ISO()
如果你想要它在 UTC 中,很容易转换它:
>>> mydate.toZone('UTC').ISO()