This will bring the home page in line with the most recent datetime class.

This commit is contained in:
skeeter 2002-08-17 01:44:23 +00:00
parent 8a8563a95b
commit 53843923e3

View File

@ -25,8 +25,12 @@
if ($GLOBALS['phpgw_info']['user']['preferences']['calendar']['mainscreen_showevents'])
{
$GLOBALS['phpgw']->translation->add_app('calendar');
$time = time() - ((60*60) * intval($GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset']));
$GLOBALS['date'] = $GLOBALS['phpgw']->common->show_date($time,'Ymd');
if(!is_object($GLOBALS['phpgw']->datetime))
{
$GLOBALS['phpgw']->datetime = CreateObject('phpgwapi.datetime');
}
$GLOBALS['date'] = date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime);
$GLOBALS['g_year'] = substr($GLOBALS['date'],0,4);
$GLOBALS['g_month'] = substr($GLOBALS['date'],4,2);
$GLOBALS['g_day'] = substr($GLOBALS['date'],6,2);