[Zope] Re: formatted date anomaly ...

Darran Edmundson Darran.Edmundson@anu.edu.au
Tue, 8 Feb 2000 23:18:18 +1100


I discovered the source of my problem with formatted
dates.  To recap, create a DTML *document* with the
following code:

  <dtml-var standard_html_header>
  <dtml-var mydate><br>
  <dtml-var mydate fmt="%Y"><br>
  <dtml-var mydate fmt="%d/%m/%Y - %H:%M"> 
  <dtml-var standard_html_footer>

Now add a property to this document (not possible for
methods) called "mydate", make it of type "date" and
enter the date value "01/01/2000".  Try rendering the
document by selecting the View tab.  On my machine
I see the following:

   2000/01/01
   1999
   31/12/1999 - 14:00 

Zope with no formatting assumes the date I entered is 
in local time.  Add formatting however and the date is 
now assumed to be GMT.  Since Zope obviously knows my
timezone, why not maintain consistency by assuming that
dates are to be rendered in the same time zone that
they were inputted?

At this late hour I cannot see the rationale for this.  Could 
someone please enlighten me.

Cheers,
Darran.