From 844b7b2e946ab54f105196cc0912afedab4ba694 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Fri, 19 Nov 2010 23:13:30 +1300 Subject: [PATCH] Handle stuff like DTSTART;TZID=America/New_York:20101119T231307 Thanks to Matthias Althaus for pointing out that while the class attempts to handle this kind of thing, it doesn't actually work. --- inc/RRule-v2.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/RRule-v2.php b/inc/RRule-v2.php index d64a4a7e..c1110ba9 100644 --- a/inc/RRule-v2.php +++ b/inc/RRule-v2.php @@ -90,6 +90,7 @@ class RepeatRuleDateTime extends DateTime { if ( preg_match('{;?VALUE=DATE[:;]}', $date, $matches) ) $this->is_date = true; elseif ( preg_match('{:([12]\d{3}) (0[1-9]|1[012]) (0[1-9]|[12]\d|3[01]Z?) $}x', $date, $matches) ) $this->is_date = true; if (preg_match('/;?TZID=([^:]+).*:(\d{8}(T\d{6})?)(Z)?/', $date, $matches) ) { + $date = $matches[2]; if ( isset($matches[4]) && $matches[4] == 'Z' ) { $dtz = new RepeatRuleTimeZone('UTC'); $this->tzid = 'UTC';