views:

26

answers:

1

How do I get an ISO date (2010-01-01 00:00:00), in addition to the localized date, in a PloneFormGen mailer template?

+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