Revision [10535]
This is an old revision of TimeWithOffset made by JasonHuebel on 2005-08-07 20:39:49.
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));
}
?>
/*
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));
}
?>
CategoryUserContributions