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.
This commit is contained in:
Andrew McMillan 2010-11-19 23:13:30 +13:00
parent 92bb66abe2
commit 844b7b2e94

View File

@ -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';