[TZInfo-users] vtimezone with tzinfo

Dusty Doris tzinfo at dusty.name
Tue Jul 8 11:58:22 EDT 2008


I found an old post talking about using tzinfo to create vcalendar
files and I was wondering if anyone ever got this working.

http://rubyforge.org/pipermail/tzinfo-users/2007-January/000009.html

I tried using the modules in this post as described and was able to
view the transition information, unfortunately, I just don't
understand what I'm looking at yet.  Using the 'America/New_York'
timezone, the transitions array had 262 objects in it.  I'm not really
sure how to translate that into what I need for a vtimezone.

I have also taken a look at Vzic and will most likely be using that,
however, if I can find a way to do this using tzinfo instead, I'd love
to go that route.  But, if its just not worth my time, I'll take that
as a helpful suggestion as well!

What I would like to do, is generate an ics file from my calendar and
insert the appropriate vcalendar part depending on the timezone the
user is in.

So, if my user elected 'America/New_York', then I'd like to be able to
inject this into the ics file.

BEGIN:VTIMEZONE
TZID:America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE

I got that from the Vzic output.

Can anyone give a beginner in timezones a hint on how to do this with
tzinfo?  Or, do you think it would just be easier to write a
bash/sed/awk/ruby script that can simply populate a database with the
content in the Vzic files?


Thanks


More information about the TZInfo-users mailing list