This commit is contained in:
skeeter 2002-06-25 01:38:34 +00:00
parent 058ddb033f
commit 45978168e2

View File

@ -1621,18 +1621,19 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
@param $format - optional can be pulled from user prefernces @param $format - optional can be pulled from user prefernces
*/ */
function show_date($t = '', $format = '') function show_date($t = '', $format = '')
{
if (!$t)
{ {
if(!is_object($GLOBALS['phpgw']->datetime)) if(!is_object($GLOBALS['phpgw']->datetime))
{ {
$GLOBALS['phpgw']->datetime = createobject('phpgwapi.datetime'); $GLOBALS['phpgw']->datetime = createobject('phpgwapi.datetime');
} }
if (!$t || intval($t) <= 0)
{
$t = $GLOBALS['phpgw']->datetime->gmtnow; $t = $GLOBALS['phpgw']->datetime->gmtnow;
} }
// + (date('I') == 1?3600:0) // + (date('I') == 1?3600:0)
$t += (3600 * intval($GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'])); $t += $GLOBALS['phpgw']->datetime->tz_offset;
if (! $format) if (! $format)
{ {