Date With Offset Action

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

        date action
        Displays the current date (with optional time offset)
        Syntax: {{date}} or {{date offset="-5"}}

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

if ($offset=="") {
        echo date("M d, Y", time());
} else {
        echo date("M d, Y", time() + (60*60*$offset));


See Also: TimeWithOffset

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