EXCEPTION "EDT" is not known to the tzinfo database

36 views
Skip to first unread message

David Renz

unread,
Mar 26, 2011, 7:12:01 PM3/26/11
to RiCal
Hello,

I'm trying to use RiCal.parse_string on the ical string below.

When I try to access the start_time for that event, I get this
exception: "EXCEPTION "EDT" is not known to the tzinfo database"

Any suggestions for how I can get around this?


BEGIN:VCALENDAR
BEGIN:VEVENT
DTSTART;TZID=EDT:20110316T000000
RDATE;TZID=EDT:20110316T000000
RDATE;TZID=EDT:20110317T000000
RDATE;TZID=EDT:20110318T000000
RDATE;TZID=EDT:20110319T000000
RDATE;TZID=EDT:20110320T000000
RDATE;TZID=EDT:20110322T000000
RDATE;TZID=EDT:20110323T000000
RDATE;TZID=EDT:20110324T000000
RDATE;TZID=EDT:20110325T000000
RDATE;TZID=EDT:20110326T000000
RDATE;TZID=EDT:20110327T000000
END:VEVENT
END:VCALENDAR

Thanks!

Dave

Rick DeNatale

unread,
Mar 26, 2011, 8:11:16 PM3/26/11
to rica...@googlegroups.com
On Sat, Mar 26, 2011 at 7:12 PM, David Renz <da...@qlabs.com> wrote:
> Hello,
>
> I'm trying to use RiCal.parse_string on the ical string below.
>
> When I try to access the start_time for that event, I get this
> exception: "EXCEPTION "EDT" is not known to the tzinfo database"
>
> Any suggestions for how I can get around this?
>
>
> BEGIN:VCALENDAR
> BEGIN:VEVENT
> DTSTART;TZID=EDT:20110316T000000

First off. In general icalendar files are required to include the
definitions of any time zone ids they reference in the form of a
BEGIN:VTIMEZONE block.

Neither the old or new icalendar RFCs define standard time zones.

Rical allows processing of calendars which don't by using either the
TZInfo gem which is a wrapper for the tz database (commonly referred
to as the Olson database) or the equivalent implementation of tzinfo
in activesupport.

Now the problem is that EDT, despite what your dad might have told you
is not a timezone, in the context of the timezone used in the eastern
US, it's the name of a period during which the local time has a
particular offset from UTC. I'm pretty sure that it's also ambiguous
since other time zones may also use the abbreviation EDT to name a
period.

A time zone, is a geographical region which agrees about the times
when the UTC offset changes back and forth between daylight saving (or
summer time) and standard time. In general the Olson database uses a
combination of a large region, and a prominent city. So what you are
probably looking for is America/New_York

http://en.wikipedia.org/wiki/Zoneinfo#Definition_of_a_time_zone


--
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

Reply all
Reply to author
Forward
0 new messages