From: Darran Edmundson [mailto:dee124@rsphy1.anu.edu.au]
Here's a strange one. I have a property StartDate (type date) set to "01/01/2000". Can someone please explain why the DTML snippet: <dtml-var StartDate> <dtml-var StartDate fmt="%Y"> renders as: 2000/01/01 1999
(More info on Zope formatting of dates and times can be found in the HowTo: http://www.zope.org/Members/AlexR/CustomDateFormats)
From the exact same How-To that you metion:
"Note that the output is GMT-based. So you cannot use these codes directly to format date and time values for say European timezones." In that sentence lies the answer to your question. -- Martijn Pieters, Software Engineer | Digital Creations http://www.digicool.com | Creators of Zope http://www.zope.org | mailto:mj@digicool.com ICQ: 4532236 | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 -------------------------------------------
Martijn Pieters wrote:
From: Darran Edmundson [mailto:dee124@rsphy1.anu.edu.au]
Here's a strange one. I have a property StartDate (type date) set to "01/01/2000". Can someone please explain why the DTML snippet: <dtml-var StartDate> <dtml-var StartDate fmt="%Y"> renders as: 2000/01/01 1999
(More info on Zope formatting of dates and times can be found in the HowTo: http://www.zope.org/Members/AlexR/CustomDateFormats)
From the exact same How-To that you metion:
"Note that the output is GMT-based. So you cannot use these codes directly to format date and time values for say European timezones."
In that sentence lies the answer to your question.
_I_ still think it's a bug in Zope. ;) The DateTime module in python returns the proper format, ie. non-GMT-based. Any reason why Zope alters course here? I can't use them directly for here in the States, either. Makes a real mess out of what should be simple code. Bill -- In flying I have learned that carelessness and overconfidence are usually far more dangerous than deliberately accepted risks. -- Wilbur Wright in a letter to his father, September 1900
participants (2)
-
Bill Anderson -
Martijn Pieters