[TZInfo-users] using TZInfo to generate iCalendar VTIMEZONE

Brandon Keepers brandon at opensoul.org
Tue Jan 9 00:50:12 EST 2007


I'm working on a CalDAV client for Ruby, and part of the icalendar  
specification requires that you define any timezones that you you  
use.  From what I've gathered, this timezone definition should  
include all the rules for dates in the icalendar file.  So, if I have  
dates spanning from Jan 2006 - June 2007, then I would need to  
include 4 rules, the old standard and daylight times, and the new  
standard and daylight times.  Here is an example of the timezone  
definition:

BEGIN:VCALENDAR
PRODID:-//Example Corp.//CalDAV Client//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:US-Eastern
LAST-MODIFIED:19870101T000000Z
BEGIN:STANDARD
DTSTART:19671029T020000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:Eastern Standard Time (US & Canada)
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:19870405T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:Eastern Daylight Time (US & Canada)
END:DAYLIGHT
END:VTIMEZONE
END:VCALENDAR

If possible, I would like to use TZInfo to get this information.   
 From what I can tell, this data is available in TZInfo, but it is  
not accessible through the API.  Could someone give me some pointers  
on how to get all "active" timezone periods for a given date  
(standard & daylight), and all timezone periods for a given date range?

Thanks,
Brandon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://rubyforge.org/pipermail/tzinfo-users/attachments/20070109/a4a7d622/attachment.bin 


More information about the TZInfo-users mailing list