How do I get an ISO date (2010-01-01 00:00:00), in addition to the localized date, in a PloneFormGen mailer template?
views:
26answers:
1
+1
A:
Do you want this for the current date/time, or for a date/time submitted via the form?
Regardless, if you have a Zope DateTime instance, you can get an ISO representation like this:
>>> mydate.ISO()
If you want it in UTC, it's easy to convert it:
>>> mydate.toZone('UTC').ISO()
David Glick
2010-04-15 00:36:54