Robert J. Berger
2008-Jan-08 09:42 UTC
[iCalendar-devel] Status of Timezone support / Handeling DTSTART; TZID="(GMT-05.00) Eastern Time (US & Canada)":20080107T123000
I can not tell from the docs or from the mailing list what is the state of timezone support in the iCalendar package? If I want to parse an iCalendar file that has non utc dstarts and dends will it convert those times to UTC or otherwise allow me to do that? When I tried to parse an iCalendar input file started off with something like this: BEGIN:VCALENDAR METHOD:REQUEST PRODID:Microsoft CDO for Microsoft Exchange VERSION:2.0 BEGIN:VTIMEZONE TZID:(GMT-05.00) Eastern Time (US & Canada) X-MICROSOFT-CDO-TZID:10 BEGIN:STANDARD DTSTART:16010101T020000 TZOFFSETFROM:-0400 TZOFFSETTO:-0500 RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=11;BYDAY=1SU END:STANDARD BEGIN:DAYLIGHT DTSTART:16010101T020000 TZOFFSETFROM:-0500 TZOFFSETTO:-0400 RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=2SU END:DAYLIGHT END:VTIMEZONE BEGIN:VEVENT DTSTAMP:20080107T155404Z DTSTART;TZID="(GMT-05.00) Eastern Time (US & Canada)":20080107T123000 I got: event.start.to_s => "2008-01-07T12:30:00+00:00" event.start.zone => "+00:00" Even though the Dstart had a TZID setting it to Eastern Time. (Vpim which I''ve been using up till now, does the same thing I''m hoping to find a vcalendar library that can work with timezones, thus my question) Is there any easy way to handle vcalendar files that have DSTARTs and DENDs that are in this format and have the event.start ether have the timezone or normalize them properly to utc? Also as a side note, I was following the example in the readme (I''m pretty sure I did all the same requires and includes as the readme) and tried to do: puts "start date-time: " + event.dtstart But got: TypeError: can''t convert DateTime into String from (irb):9:in `+'' from (irb):9 But event.start worked fine. ?????????????????????????????? Robert J. Berger - Internet Bandwidth Development, LLC. Voice: 408-838-8896 eFax: +1-408-490-2868 http://www.ibd.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/icalendar-devel/attachments/20080108/30c64046/attachment.html