I have made a temporary fix for the 1 hour off setting in the invite emails. keep in mind it is only a hack, it will of course be overwritten next update... and hopefully with the legit working code. Anwhos... here it is:
You should be running the 4.2.1a release. Once update go into sugar/modules/Meetings/Meeting.php. Find the following
PHP Code:
$xOffset = $timedate->handle_offset($x, $prefDate['date']." ".$prefDate['time'], true, $current_user);
change it to this:
PHP Code:
$xOffset = $timedate->handle_offset($x, $prefDate['date']." ".$prefDate['time'], true, $current_user, 1);
then find:
PHP Code:
$xtpl->assign("MEETING_STATUS",(isset($meeting->status)? $app_list_strings['meeting_status_dom'][$meeting->status]:"" ));
$xtpl->assign("MEETING_STARTDATE", $xOffset." ".$prefDate['userGmt']);
and make it look like this:
PHP Code:
$xtpl->assign("MEETING_STATUS",(isset($meeting->status)? $app_list_strings['meeting_status_dom'][$meeting->status]:"" ));
$userGmt = $prefDate['userGmt'];
$userGmt[strlen($userGmt)-2]=5;
$prefDate['userGmt'] = $userGmt;
$xtpl->assign("MEETING_STARTDATE", $xOffset." ".$prefDate['userGmt']);
the indented lines are the changes for this file.
Then go into sugar/include/TimeDate.php
find:
PHP Code:
function handle_offset($date, $format, $to = true, $user = null) {
change to:
PHP Code:
function handle_offset($date, $format, $to = true, $user = null, $notify=0) {
find:
PHP Code:
$deltaServerUser = $this->get_hour_offset($to, $timezone);
change to:
PHP Code:
$deltaServerUser = $this->get_hour_offset($to, $timezone)+$notify;
this should allow you to use the non yyyy-mm-dd formats and still have accurate dates/times and time zone listings in the invites. By adding the $notify=null option in the above function you avoide messing up other sections of the site. If you make a call to that function and dont set that variable it will ignore the hack.
Enjoy!
-- Matthew Peychich
P.S. $notify's value should be the number of hours you are off. we were getting (GMT -4) we are actually GMT-5 so we have it set to 1. and:
$userGmt[strlen($userGmt)-2]=5;
should be set to whatever time zone you are. ours is again, 5. i believe this will only show correctly on local time zone invites.
Bookmarks