mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
Added option to export events in server timezone
This commit is contained in:
parent
9e7a9d9291
commit
faf7ad8ddf
@ -120,6 +120,14 @@ class calendar_ical extends calendar_boupdate
|
||||
*/
|
||||
var $uidExtension = false;
|
||||
|
||||
/**
|
||||
* user preference: use server timezone for exports to device
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
var $useServerTZ = false;
|
||||
|
||||
|
||||
/**
|
||||
* Device CTCap Properties
|
||||
*
|
||||
@ -238,11 +246,13 @@ class calendar_ical extends calendar_boupdate
|
||||
|
||||
if ($this->log) error_log(__FILE__.'['.__LINE__.'] '.__METHOD__."()\n".array2string($event)."\n",3,$this->logfile);
|
||||
|
||||
if (!$serverTZ
|
||||
&& $event['recur_type'] != MCAL_RECUR_NONE
|
||||
&& date('e', $event['start']) != 'UTC')
|
||||
if (!$serverTZ && date('e', $event['start']) != 'UTC'
|
||||
&& ($event['recur_type'] != MCAL_RECUR_NONE
|
||||
|| $this->useServerTZ))
|
||||
{
|
||||
if ($event['recur_enddate'])
|
||||
if (!$this->useServerTZ &&
|
||||
$event['recur_type'] != MCAL_RECUR_NONE
|
||||
&& $event['recur_enddate'])
|
||||
{
|
||||
$startDST = date('I', $event['start']);
|
||||
$finalDST = date('I', $event['recur_enddate']);
|
||||
@ -1237,6 +1247,11 @@ class calendar_ical extends calendar_boupdate
|
||||
{
|
||||
$this->nonBlockingAllday = true;
|
||||
}
|
||||
if (isset($deviceInfo['tzid']) &&
|
||||
$deviceInfo['tzid'])
|
||||
{
|
||||
$this->useServerTZ = ($deviceInfo['tzid'] == 1);
|
||||
}
|
||||
if (!isset($this->productManufacturer) ||
|
||||
$this->productManufacturer == '' ||
|
||||
$this->productManufacturer == 'file')
|
||||
|
Loading…
Reference in New Issue
Block a user