[pmwiki-users] ({*$LastModified}) vs {(ftime fmt="%F" {*$LastModified})}
Petko Yotov
5ko at 5ko.fr
Sun May 20 13:17:34 CDT 2012
On Sunday 20 May 2012 18:47:00 ABClf wrote:
> At first, in template page, I used : {(ftime fmt="%F" {*$LastModified})}
> but, strange for me, it does not work all time : in some cases, it
> just prints out 1970–01–01 ; in other cases it shows the expected
> date.
{*$LastModified} is the time formatted according to the $TimeFmt variable.
If you use {(ftime fmt="%F" "{*$LastModified}")}, note the quotes, the markup
expression will try to parse (guess) the timestamp from the string, but this
in some cases will not work, because the format is not standard, or is not in
English.
You can use {(ftime fmt="%F" "@{*$LastModifiedTime}")} instead, note @.
{*$LastModifiedTime} contains the number of seconds since 1970–01–01 00:00,
and preceded with @, the markup expression will be parsed without problems to
the real timestamp.
Petko
More information about the pmwiki-users
mailing list