summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/libcalendaring/libvcalendar.php4
-rw-r--r--plugins/libcalendaring/tests/libvcalendar.php4
2 files changed, 5 insertions, 3 deletions
diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php
index 2a39aac..bb43388 100644
--- a/plugins/libcalendaring/libvcalendar.php
+++ b/plugins/libcalendaring/libvcalendar.php
@@ -1191,8 +1191,8 @@ class libvcalendar implements Iterator
$offset = $trans['offset'] / 3600;
$cmp->DTSTART = $dt->format('Ymd\THis');
- $cmp->TZOFFSETFROM = sprintf('%s%02d%02d', $tzfrom >= 0 ? '+' : '', floor($tzfrom), 0);
- $cmp->TZOFFSETTO = sprintf('%s%02d%02d', $offset >= 0 ? '+' : '', floor($offset), 0);
+ $cmp->TZOFFSETFROM = sprintf('%s%02d%02d', $tzfrom >= 0 ? '+' : '', floor($tzfrom), ($tzfrom - floor($tzfrom)) * 60);
+ $cmp->TZOFFSETTO = sprintf('%s%02d%02d', $offset >= 0 ? '+' : '', floor($offset), ($offset - floor($offset)) * 60);
if (!empty($trans['abbr'])) {
$cmp->TZNAME = $trans['abbr'];
diff --git a/plugins/libcalendaring/tests/libvcalendar.php b/plugins/libcalendaring/tests/libvcalendar.php
index a670d0c..4ea9ede 100644
--- a/plugins/libcalendaring/tests/libvcalendar.php
+++ b/plugins/libcalendaring/tests/libvcalendar.php
@@ -519,8 +519,10 @@ class libvcalendar_test extends PHPUnit_Framework_TestCase
$this->assertEquals(false, $vtz);
// DateTimezone as input data
- $vtz = libvcalendar::get_vtimezone(new DateTimezone('Europe/Istanbul'));
+ $vtz = libvcalendar::get_vtimezone(new DateTimezone('Pacific/Chatham'));
$this->assertInstanceOf('\Sabre\VObject\Component', $vtz);
+ $this->assertContains('TZOFFSETFROM:+1245', $vtz->serialize());
+ $this->assertContains('TZOFFSETTO:+1345', $vtz->serialize());
}
function get_attachment_data($id, $event)