Re: [Zope] ZopeTime questions (DTML mainly)
Hi, -----Original Message----- From: Samu Mielonen <ex@uiah.fi> To: zope@zope.org <zope@zope.org> Date: Friday, October 15, 1999 5:53 AM Subject: [Zope] ZopeTime questions (DTML mainly)
I'm trying to figure out the ZopeTime object (or is it a method?) and how to use it.
I've tried to render Finnish date and time, which is of format:
dd.mm.yyyy, hh:mm:ss
so for example:
15.10.1999m, 21:04:05
means 15th of October, 1999 at four past nine pm (and 5 seconds)
Rendering this visible with <dtml-var ZopeTime fmt=...> seems straightforward enough (here, without seconds):
<dtml-var release fmt="%d.%m.%Y, %H:%M">
but the problem is that %H (and %d, %m %Y too because of this?) are not from the current time zone (but from GMT?).
I have encountered this myself. One method that the ZopeTime object has is toZone. So, I think you could do: <dtml-var "release.toZone(YourTimeZone).strftime('%d.%m.%Y, %H:%M')"> I don't know how this would compare to other solutions from an efficiency standpoint... Kevin
participants (1)
-
Kevin Dangoor