[Zope] ZopeTime() in python script ...
Chris Withers
chrisw@nipltd.com
Thu, 10 May 2001 13:58:38 +0100
Mike Blake wrote:
>
> I have a messy dtml block that returns a yyyymmdd date
> string using zope time:
>
> # <dtml-var "(ZopeTime()).year()"
> # ><dtml-if
> # expr="(ZopeTime()).month()<10"
> # >0<dtml-var "(ZopeTime()).month()"
> # ><dtml-else
> # ><dtml-var "(ZopeTime()).month()"
> # ></dtml-if
> # ><dtml-if
> # expr="(ZopeTime()).day()<10"
> # >0<dtml-var "(ZopeTime()).day()"
> # ><dtml-else
> # ><dtml-var "(ZopeTime()).day()"
> # ></dtml-if>
Yurg! :-S
What's wrong with:
<dtml-var ZopeTime fmt="%Y%m%d">
?!?
Chris