diff --git a/calendar/inc/class.calendar_hooks.inc.php b/calendar/inc/class.calendar_hooks.inc.php index 83e755eb2e..0c8eeb1a4b 100644 --- a/calendar/inc/class.calendar_hooks.inc.php +++ b/calendar/inc/class.calendar_hooks.inc.php @@ -249,6 +249,10 @@ class calendar_hooks $freebusy_help = lang('Should not loged in persons be able to see your freebusy information? You can set an extra password, different from your normal password, to protect this informations. The freebusy information is in iCal format and only include the times when you are busy. It does not include the event-name, description or locations. The URL to your freebusy information is %1.',''.$freebusy_url.''); } + // Timezone for file exports + $export_tzs = array(1 => 'Use Event TZ'); + $export_tzs += egw_time::getTimezones(); + return array( 'defaultcalendar' => array( 'type' => 'select', @@ -424,6 +428,16 @@ class calendar_hooks 'admin' => False, 'forced' => 'ical', ), + 'export_timezone' => array( + 'type' => 'select', + 'label' => 'Timezone of event exports', + 'name' => 'export_timezone', + 'values' => $export_tzs, + 'help' => 'Use this timezone to export calendar data.', + 'xmlrpc' => True, + 'admin' => False, + 'default' => '1', // Use event's TZ + ), 'notifyAdded' => array( 'type' => 'notify', 'label' => 'Notification messages for added events', diff --git a/calendar/inc/class.calendar_ical.inc.php b/calendar/inc/class.calendar_ical.inc.php index 65133b1395..217d9f00de 100644 --- a/calendar/inc/class.calendar_ical.inc.php +++ b/calendar/inc/class.calendar_ical.inc.php @@ -1943,7 +1943,21 @@ class calendar_ical extends calendar_boupdate break; case 'file': // used outside of SyncML, eg. by the calendar itself ==> all possible fields - $this->tzid = false; // use event's TZ + if (isset($this->cal_prefs['export_timezone'])) + { + switch ($this->cal_prefs['export_timezone']) + { + case 1: + $this->tzid = false; // use event's TZ + break; + default: + $this->tzid = $this->cal_prefs['export_timezone']; + } + } + else + { + $this->tzid = false; // use event's TZ + } $this->supportedFields = $defaultFields['full']; break;