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:

        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

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