summaryrefslogtreecommitdiff
path: root/plugins/libcalendaring/libcalendaring.php
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-03-09 14:40:15 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-03-09 14:40:25 (GMT)
commit3702557dc3cc0da27309b6214d7aa2ad75125b15 (patch)
tree4b8406a29bbca60f3abba6c056229f0d4074500b /plugins/libcalendaring/libcalendaring.php
parent88692ea3fe8e54d0110765a7da95dd7155dd2958 (diff)
downloadroundcubemail-plugins-kolab-3702557dc3cc0da27309b6214d7aa2ad75125b15.tar.gz
Export recurrence UNTIL parameter as DATE for all-day events (#3998)
Diffstat (limited to 'plugins/libcalendaring/libcalendaring.php')
-rw-r--r--plugins/libcalendaring/libcalendaring.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/libcalendaring/libcalendaring.php b/plugins/libcalendaring/libcalendaring.php
index 698fb68..4f277cf 100644
--- a/plugins/libcalendaring/libcalendaring.php
+++ b/plugins/libcalendaring/libcalendaring.php
@@ -1501,7 +1501,7 @@ class libcalendaring extends rcube_plugin
/**
* Convert the internal structured data into a vcalendar rrule 2.0 string
*/
- public static function to_rrule($recurrence)
+ public static function to_rrule($recurrence, $allday = false)
{
if (is_string($recurrence))
return $recurrence;
@@ -1513,9 +1513,14 @@ class libcalendaring extends rcube_plugin
case 'UNTIL':
// convert to UTC according to RFC 5545
if (is_a($val, 'DateTime')) {
- $until = clone $val;
- $until->setTimezone(new DateTimeZone('UTC'));
- $val = $until->format('Ymd\THis\Z');
+ if (!$allday && !$val->_dateonly) {
+ $until = clone $val;
+ $until->setTimezone(new DateTimeZone('UTC'));
+ $val = $until->format('Ymd\THis\Z');
+ }
+ else {
+ $val = $val->format('Ymd');
+ }
}
break;
case 'RDATE':