[mod_python] How to format ssi dates ?

Graham Dumpleton grahamd at dscpl.com.au
Tue Nov 14 05:06:50 EST 2006

On 14/11/2006, at 8:52 PM, durumdara wrote:

> Hi !
> 1.)
> Thanks for the SSI examples (to custom ErrorPages) !
> 2.)
> I want to uniformize the local datetime.
> <td>Idő:</td><td><!--#echo var="DATE_LOCAL" --></td>
> ("Idő" is "Time" in english)
> The result in SSI:
> Idő: Monday, 13-Nov-2006 14:34:54 Közép-európai téli idő
> (Time: Monday, 13-Nov-2006 14:34:54 Central-European Winter Time)
> This is mixed time string. The Monday, and the datetime format is  
> english, another texts are hungarian.
> How to force YYYY.MM.DD hh:mm:ss timestamp format in my SSI page ?

Have you tried looking at the SSI documentation on the Apache web site?


Specifically, look for:

   <!--#config timefmt="%A %B %d, %Y" -->
    Today is <!--#echo var="DATE_LOCAL" -->

The format string for time is based on what system strftime()  
function takes.
You can look at what these generally are by looking at the Python  
documentation, although that isn't what is actually being used here.



More information about the Mod_python mailing list