From 53843923e3f7ab8395e5b16e14342c064585736d Mon Sep 17 00:00:00 2001 From: skeeter Date: Sat, 17 Aug 2002 01:44:23 +0000 Subject: [PATCH] This will bring the home page in line with the most recent datetime class. --- calendar/inc/hook_home.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/calendar/inc/hook_home.inc.php b/calendar/inc/hook_home.inc.php index 485db18d5f..ad98e81050 100755 --- a/calendar/inc/hook_home.inc.php +++ b/calendar/inc/hook_home.inc.php @@ -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);