mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-04 04:19:41 +01:00
Enforce configured device timezone during import
This commit is contained in:
parent
43c5373b4d
commit
3d93128777
@ -126,7 +126,7 @@ class calendar_ical extends calendar_boupdate
|
|||||||
*
|
*
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
var $log = false;
|
var $log = true;
|
||||||
var $logfile="/tmp/log-vcal";
|
var $logfile="/tmp/log-vcal";
|
||||||
|
|
||||||
|
|
||||||
@ -1476,9 +1476,15 @@ class calendar_ical extends calendar_boupdate
|
|||||||
$dtstart_ts = is_numeric($attributes['value']) ? $attributes['value'] : $this->date2ts($attributes['value']);
|
$dtstart_ts = is_numeric($attributes['value']) ? $attributes['value'] : $this->date2ts($attributes['value']);
|
||||||
$vcardData['start'] = $dtstart_ts;
|
$vcardData['start'] = $dtstart_ts;
|
||||||
|
|
||||||
// import TZID, if PHP understands it (we only care about TZID of starttime, as we store only a TZID for the whole event)
|
|
||||||
if (!empty($attributes['params']['TZID']))
|
if ($this->tzid)
|
||||||
{
|
{
|
||||||
|
// enforce device settings
|
||||||
|
$event['tzid'] = $this->tzid;
|
||||||
|
}
|
||||||
|
elseif (!empty($attributes['params']['TZID']))
|
||||||
|
{
|
||||||
|
// import TZID, if PHP understands it (we only care about TZID of starttime, as we store only a TZID for the whole event)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$tz = calendar_timezones::DateTimeZone($attributes['params']['TZID']);
|
$tz = calendar_timezones::DateTimeZone($attributes['params']['TZID']);
|
||||||
@ -1490,10 +1496,6 @@ class calendar_ical extends calendar_boupdate
|
|||||||
$event['tzid'] = egw_time::$user_timezone->getName(); // default to user timezone
|
$event['tzid'] = egw_time::$user_timezone->getName(); // default to user timezone
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($this->tzid)
|
|
||||||
{
|
|
||||||
$event['tzid'] = $this->tzid;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$event['tzid'] = egw_time::$user_timezone->getName(); // default to user timezone
|
$event['tzid'] = egw_time::$user_timezone->getName(); // default to user timezone
|
||||||
|
Loading…
Reference in New Issue
Block a user