ssi

SSI timefmt suppress leading zero in the hour


This Server Side Include fragment:

<!--#config timefmt="%a, %d%b'%y %I:%M%P %Z" -->
Content updated: <!--#flastmod virtual='../pages/$JLC_CONTENT_FILE' --> 

produces:

Page result with leading zero on the hour.

How can one suppress the leading zero in the hour?


Solution

  • The timefmt uses the standard C function strftime(), so "%k" drops the leading zero:

    <!--#config timefmt="%a, %e%b'%y %k:%M%P %Z" -->