Revision [16832]

This is an old revision of TimeWithOffset made by EwxUk1 on 2007-05-31 10:53:59.

 

Time With Offset Action


This action displays the current server time, with an optional offset. Here's the code, which should be saved as actions/time.php:

 <?php
/*
        time action
        Displays the current time (with optional offset)
        Syntax: {{time}} or {{time offset="-5"}}
*/


$offset = trim($vars['offset']);

if ($offset=="") {
        echo date("h:i:s a", time());
} else {
        echo date("h:i:s a", time()   (60*60*$offset));
}

?>


See also: DateWithOffset


CategoryUserContributions
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki