Results 1 to 3 of 3

Thread: Notification Email - Time in GMT

  1. #1
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Notification Email - Time in GMT

    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

  2. #2
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: Notification Email - Time in GMT

    Quote Originally Posted by mikesolomon
    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 it

    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.

  3. #3
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: Notification Email - Time in GMT

    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. HOW-TO guide for Email Campaigns.
    By agupta in forum Marketing/Campaign Management
    Replies: 146
    Last Post: 2012-01-31, 03:08 PM
  2. email marketing feature requests
    By maxsutter in forum Feature Requests
    Replies: 1
    Last Post: 2008-10-11, 10:19 AM
  3. Replies: 0
    Last Post: 2006-10-05, 06:31 PM
  4. Replies: 1
    Last Post: 2005-12-07, 02:15 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •