I use this perl code to reformat different kind of date formats:

POSIX::strftime("%x %X",localtime(HTTP::Date::str2time($_[0])));

You could of course turn that into a callback in your main TT variable list. I call my method call "human_date". :)

So yes, the HTTP::Date::str2time function will help you out...

-- Robin

® wrote:
In Templates, is there any function to convert given date to time in
seconds.. given that minute,hour, day,month, year defined by user..
similar like timelocal() function in perl..

to get date, i used [% date.format(1163047038) %] ..

_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to