[pmwiki-users] tweaking the operation of Site.AuthForm
Hans
design at softflow.co.uk
Wed Mar 22 16:06:44 CST 2006
Wednesday, March 22, 2006, 8:38:35 PM, Neil wrote:
> Since you are in question answering mode, is there a PmWiki variable
> that will display the current time?
> I want to write: It was (:time:) in Ottawa when you requested this
> page. Refresh the page to see the current time.
Well there isn't, but we can easily create one:
# adds pagevariable {$Time} of format HH:MM:SS, 24 hour clock.
$FmtPV['$Time'] = 'strftime("%H:%M:%S", time() )';
If you want a different format change it inside the strftime function,
see http://uk.php.net/strftime
time() returns the time as a Unix string from the server.
strftime makes it legible for humans.
I used it to set various variables for different date and page
creation date etc in blogsimple.
Best,
Hans
More information about the pmwiki-users
mailing list