[Zope] Date Problem

Daniel Rusch drusch@globalcrossing.com
Thu, 19 Apr 2001 08:43:40 -0500


We had the same problem. It has to do with zope returning dates in GMT.
So sometimes you have the correct day and sometimes it's a different
"day" in England. 

We made a dtml method called CentralDateTime:

<dtml-var "(ZopeTime()).toZone('US/Central')" fmt="Day" >, <dtml-var
"(ZopeTime()).toZone('US/Central')" fmt="fCommonZ" >

Seems to work for us.

Dan

Ron Baum wrote:
> 
> I have just discovered a problem in the date that is displayed in Zope.  I
> have some things that put date/time stamps in my database and then I can
> display these in a report later.  When I display the date I use the
> following format <dtml-var datevalue fmt="%m/%d/%Y">  the dates are not
> correct. eg. 3/26/2001 8:36 PM is displayed as 3/27/2001 instead of
> 3/26/2001.  The date value is not always 1 day off sometimes it shows the
> correct date.  I think it has something to do with the time.
> 
> I checked the time zone settings on all my servers and personal machine.
> 
> System: NT 4, Zope 2.2, FoxPro 5(not my choice)
> 
> Thanks in advance.
> ----------------------------------------------------------------------------
> ------------------
> Ron Baum
> Database Engineer
> Accelerated Technology, Inc.
> 720 Oak Circle Dr East
> Mobile, AL 36609
> 
> Email: rbaum@atinucleus.com
> http://www.acceleratedtechnology.com
> ----------------------------------------------------------------------------
> ------------------
> "Nucleus.  All You NEED in an RTOS.  Royalty Free."
> ----------------------------------------------------------------------------
> ------------------
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )