[Zope] DateTime Issues

Andrew Milton akm at theinternet.com.au
Thu Dec 24 02:14:39 EST 2009


+-------[ Lennart Regebro ]----------------------
| On Wed, Dec 23, 2009 at 18:24, Justin Dunsworth
| <justin.dunsworth at gmail.com> wrote:
| > I am having difficulties with time zones and rendering proper times/dates.
| > My time zone is GMT-6 (CST)... mysql reports the proper time/date, running
| > <dtml-var expr="e.strftime('%c')"> shows Zope has the right date, running a
| > query straight from the SQLMethod shows the proper time in relation to the
| > field in mysql. However, when I try and run the variable in the dtml
| > document it gives the time in GMT+0.
| >
| > For example... in mysql I have "2009-12-23 10:41:06" as the?date of
| > the?record.?Running the SQL Method returns it as '2009/12/23 10:41:06 GMT+0'
| > -- So far so good but when I run <dtml-var comment_date fmt="%m-%d-%y
| > %H:%M"> in my document it gives: 12-23-09 04:41.
| 
| What would you expect it to be? It seems correct to me.

He expects (as most of us expect at first) the time not to be
converted to the local zone just because you want to format the
time display.

-- 
Andrew Milton
akm at theinternet.com.au


More information about the Zope mailing list