From 0b02a6d123b2014705998c94ddf3d460948d3eac Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 10 May 2016 17:26:44 -0700 Subject: initial sabre upgrade (needs lots of work - to wit: authentication, redo the browser interface, and rework event export/import) --- include/event.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'include/event.php') diff --git a/include/event.php b/include/event.php index e54a172c2..5e50d6cae 100644 --- a/include/event.php +++ b/include/event.php @@ -539,16 +539,16 @@ function event_import_ical($ical, $uid) { // logger('dtstart: ' . var_export($dtstart,true)); - - switch($dtstart->timezone_type) { - case VObject\Property\DateTime::UTC : - $ev['adjust'] = 0; - break; - case VObject\Property\DateTime::LOCALTZ : - default: - $ev['adjust'] = 1; - break; - } +// @FIXME - convert/upgrade to vobject [3|4] +// switch($dtstart->timezone_type) { +// case VObject\Property\DateTime::UTC : +// $ev['adjust'] = 0; +// break; +// case VObject\Property\DateTime::LOCALTZ : +// default: +// $ev['adjust'] = 1; +// break; +// } $ev['start'] = datetime_convert((($ev['adjust']) ? 'UTC' : date_default_timezone_get()),'UTC', $dtstart->format(\DateTime::W3C)); -- cgit v1.2.3 From 915bd2ec7745110919a4d386ae2b433a2c22701a Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 10 May 2016 19:40:15 -0700 Subject: sabre upgrade --- include/event.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'include/event.php') diff --git a/include/event.php b/include/event.php index 5e50d6cae..e41bf2db7 100644 --- a/include/event.php +++ b/include/event.php @@ -536,20 +536,10 @@ function event_import_ical($ical, $uid) { } $dtstart = $ical->DTSTART->getDateTime(); + $ev['adjust'] = (($ical->DTSTART->isFloating()) ? 1 : 0); // logger('dtstart: ' . var_export($dtstart,true)); -// @FIXME - convert/upgrade to vobject [3|4] -// switch($dtstart->timezone_type) { -// case VObject\Property\DateTime::UTC : -// $ev['adjust'] = 0; -// break; -// case VObject\Property\DateTime::LOCALTZ : -// default: -// $ev['adjust'] = 1; -// break; -// } - $ev['start'] = datetime_convert((($ev['adjust']) ? 'UTC' : date_default_timezone_get()),'UTC', $dtstart->format(\DateTime::W3C)); -- cgit v1.2.3