[Vtigercrm-commits] [Vtiger development] #8497: Google Calendar Sync in vtiger 6.2
Vtiger development
vtiger-tickets at trac.vtiger.com
Wed Mar 4 07:21:26 GMT 2015
#8497: Google Calendar Sync in vtiger 6.2
-----------------------+------------------------
Reporter: uma | Owner: developer
Type: defect | Status: new
Priority: major | Milestone: 6.3.0
Component: vtigercrm | Version: 6.2.0
Severity: Medium | Resolution:
Keywords: |
-----------------------+------------------------
Comment (by uma):
== Changes shared by Richard ==
This now works for us after the following changes, please note that line
numbers may be slightly off due to editing the files:
modules/Google/connectors/Calendar.php line 143:
was $maxModifiedTime = date('Y-m-d H:i:s',
strtotime(Google_Contacts_Model::vtigerFormat(end($calendarRecords)->getUpdated()))
+ 1);
now $maxModifiedTime = date('Y-m-d H:i:s',
strtotime(Google_Calendar_Model::vtigerFormat(end($calendarRecords)->getUpdated()))
+ 1);
./modules/Google/models/Calendar.php
public function vtigerFormat($date) {
// EDIT
$origDate = $date;
// END EDIT
list($date, $timestring) = explode('T', $date);
list($time, $tz) = explode('.', $timestring);
// EDIT - if this is UTC lets change it to correct system time
if(substr($tz,-1) == 'Z') {
$date = new DateTime($origDate);
$timeZone = new DateTimeZone(date_default_timezone_get());
$date->setTimezone($timeZone);
$date = $date->format('Y-m-d H:i:s');
return $date;
}
// END EDIT
return $date . " " . $time;
}
function getStartTimeUTC($user = false) { AND function
getEndTimeUTC($user = false) {
was $timeZone = new DateTimeZone('UTC');
now $timeZone = new DateTimeZone(date_default_timezone_get());
--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/8497#comment:1>
Vtiger development <http://trac.vtiger.com/>
Vtiger CRM
More information about the vtigercrm-commits
mailing list