Subject: [calsify] VTIMEZONE vs. TZInfo - looking for confirmation

From: Rick DeNatale <[email-masked]>
Date: Thu, 15 Apr 2010 20:34:02 -0400

Hi,

I just spent the afternoon tracking down a problem with my ri_cal ruby gem.

One of the things I do is generate VTIMEZONE components from tzinfo
data, using the tz_info ruby gem.

It seems that tzinfo and rfc 2445 have different views of when a time
zone period starts in local time.

Now the local time when a timezone period starts is a bit ambiguous,
since at the transition, of say US Eastern time from EST to EDT last
month, local time could be considered to either be

20100314T020000
or
20100314T030000

or both

As I understand RFC 2445 the DTSTART for this timezone period would be
the first.

This understanding is what I want to confirm, although looking at
sample ics files I'm pretty confident.

The TZInfo gem uses the latter.

I fixed this by using the local end time of the previous period (if a
previous period exists), and if not I adjust the start time either
forward or backward 1 hour depending on whether or not it's a daylight
or standard period.  There might be a subtle bug here in the latter
case if some timezones use a DST shift other than an hour, but for now
I'll live with that.

-- 
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