At 13:24 22/10/99 , Alexandre Ratti wrote:
Hello,
I want to use French date formats. Here is what I have understood so far about international date formats. If anything is wrong, please say so. I use Zope 2.0.1.
I'll write up an howto to summarize the story.
1) OK, if I want to enter the edit time for an objet, I just enter
<dtml-var bobobase_modification_time>
The result is a long time stamp in GMT format. Eg. :
1999/10/22 13:01:33.059 GMT+1
2) If I want another format, I can use C-style format strings. Eg. :
<dtml-var bobobase_modification_time fmt="%d/%m/%Y - %H:%M">
I get the following results : "22/10/1999 - 11:01". Fine, but it's two hours off because it is GMT based.
I can also use :
<dtml-var "bobobase_modification_time().strftime('%d/%m/%Y - %H:%M')">
Same result.
3) Someone suggested using the "toZone('myTimeZone')" method. Eg.:
<dtml-var "bobobase_modification_time().toZone('US/Indiana-Starke').strftime('%d/%m/ %Y - %H:%M')">
I generally use: <dtml-with bobobase_modification_time> <dtml-var "'%s/%s/%i - %s' % (dd(), mm(), year(), TimeMinutes())"> </dtml-with> -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------