[Zope] date format in other time-zone
Alexander Staubo
alex@mop.no
Mon, 13 Mar 2000 01:14:08 +0100
Like so, for example:
<dtml-var "MyDate.toZone('GMT')" fmt="ISO">
Date-time math is very simple with Zope's DateTime objects. DateTime
supports fractional, C-type clock values -- 1.0 is one day, 0.5 is half
a day, 1 / 24.0 ~= 0.0416 is one hour. So,
<dtml-var "(ZopeTime() + 1).toZone('GMT+5')" fmt="ISO">
gives you the time tomorrow, adjusted to GMT+5. You can use named time
zones such as "US/Eastern".
--
Alexander Staubo http://alex.mop.no/
"`This must be Thursday,' said Arthur to himself, sinking low over
his beer, `I never could get the hang of Thursdays.'"
--Douglas Adams, _The Hitchhiker's Guide to the Galaxy_
> -----Original Message-----
> From: Sin Hang Kin [mailto:iekentsin@infoez.com.mo]
> Sent: Sunday, March 12, 2000 9:21 AM
> To: Zope Admin list
> Subject: [Zope] date format in other time-zone
>
>
> Is it possible to format a date to GMT or in general in other
> timezone other
> zone?
>
> I have read through the Quick reference but do not have answer. The
> ToZone(z) is listed there under DateTime. But How can I use that?
>
> Moreover, how can I make date-time calculate : adding 3 days
> to current
> time. Add 2 minutes to current time, etc.
>
> Rgs,
>
> Kent Sin
>
>
>
> _______________________________________________
> 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 )
>