[Zope] DateTime help

Evan Simpson evan@4-am.com
Wed, 24 Nov 1999 13:58:37 -0600


ScherBi@BAM.com wrote:

> I have a variable, accessible as <dtml-var lastLoginTime>.  the value is
> functionally equivalent to int(time.time()).
>
> How can I turn this into a DateTime object within dtml so that I may format
> it eg, fmt=AMPM ?

Pass it to _.DateTime(), as in:

<dtml-var expr="_.DateTime(lastLoginTime)" fmt=AMPM>

Cheers,

Evan @ 4-am