Closed eebs closed 12 years ago
I'm going to close this issue for now, as it has been fixed by 2d828205. While it is still not technically accepting of valid iCal timezones, the code handles the issue much better now.
accommodate unusual timezone values more gracefully fixes #32.
You should not change your code to create a timezone using "US-Eastern" since this TZID is only valid in that iCalendar object. On the same page of RFC2445 (page 30), there is a paragraph saying: "An individual "VTIMEZONE" calendar component MUST be specified for each unique "TZID" parameter value specified in the iCalendar object." Therefore, the TZID "US-Eastern" refers to a VTIMEZONE component of the iCalendar object. You should be able to find the VTIMEZONE component in the iCalendar file like: BEGIN:VTIMEZONE TZID:US-Eastern LAST-MODIFIED:19870101T000000Z TZURL:http://zones.stds_r_us.net/tz/US-Eastern BEGIN:STANDARD DTSTART:19671029T020000 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 TZOFFSETFROM:-0400 TZOFFSETTO:-0500 TZNAME:EST END:STANDARD BEGIN:DAYLIGHT DTSTART:19870405T020000 RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 TZOFFSETFROM:-0500 TZOFFSETTO:-0400 TZNAME:EDT END:DAYLIGHT END:VTIMEZONE
Note The feed we are working with fixed the timezone to be 'America/New_York, so it is not currently representative of the issue. However, the code shown below illustrates the problem.
We're working with a new ical feed (http://uvmbored.com/event/?feed=ical) and it's throwing some errors. It contains a TZID value that looks like this:
This is a valid value for TZID as described in RFC2445 on Page 30. Line 356 in ICalendar.php takes the TZID value and passes it to a new DateTimeZone object:
The DateTimeZone constructor takes a timezone as a parameter. However, I can't find the exact string 'US-Eastern' in the list of supported timezones. The closest I can find is listed under 'Others' (all timezones listed under Others except UTC are deprecated) and is the string 'US/Eastern'.
The error Kurogo is giving me is as follows:
Is this just a problem between the two standards?
Thanks, Eebs