Sugarcrm 5.0.0.c
Notification emails times are in GMT
How can I change it to localtime
I have looked in task.php at the function set_notification_body($xtpl, $task) but can't work out the php code needed to convert it
Any help would be appreciated
Sugarcrm 5.0.0.c
Notification emails times are in GMT
How can I change it to localtime
I have looked in task.php at the function set_notification_body($xtpl, $task) but can't work out the php code needed to convert it
Any help would be appreciated
I have now managed to fix itOriginally Posted by mikesolomon
I changed task.php
$TZ = date_default_timezone_get() ;
$query = "SELECT DATE_FORMAT(CONVERT_TZ('$task->date_due $task->time_due','GMT','$TZ'), '%d-%m-%y %H:%i') AS ST";
$result =$this->db->query($query,true, $app_strings['ERR_CREATING_FIELDS']);
$row = $this->db->fetchByAssoc($result);
$xtpl->assign("TASK_DUEDATE", $row['ST']);
Last edited by mikesolomon; 2008-04-23 at 09:37 AM.
The code is quite correct
$TZ = date_default_timezone_get() ; gives the server timezone not the user timezone - works for me as all our users are in the same timezone as is the server
really I need the timezone of the assigned user
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks