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

View File

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