Subject: Bugs(?) in RFC 2445 RECUR examples

From: Jonathan Lennox <[email-masked]>
Date: Sun, 8 Jul 2001 23:19:02 -0400 (EDT)

I just improved my RECUR parser to honor the 'Z' parameter of Date-Time
properly, and I discovered that my code was no longer generating the same
results as RFC 2445 specifies.  On investigating, I think this is actually
an error in RFC
2445.

The two (or three, one is a double) problematic examples are:

   Everyday in January, for 3 years:

     DTSTART;TZID=US-Eastern:19980101T090000
     RRULE:FREQ=YEARLY;UNTIL=20000131T090000Z;
      BYMONTH=1;BYDAY=SU,MO,TU,WE,TH,FR,SA
     or
     RRULE:FREQ=DAILY;UNTIL=20000131T090000Z;BYMONTH=1

     ==> (1998 9:00 AM EDT)January 1-31
         (1999 9:00 AM EDT)January 1-31
         (2000 9:00 AM EDT)January 1-31

   Every 3 hours from 9:00 AM to 5:00 PM on a specific day:

     DTSTART;TZID=US-Eastern:19970902T090000
     RRULE:FREQ=HOURLY;INTERVAL=3;UNTIL=19970902T170000Z

     ==> (September 2, 1997 EDT)09:00,12:00,15:00

The problem arises because DTSTART is specified in US-Eastern, but UNTIL is
specified in UTC (Zulu), as the spec requires.

For the first (two) examples, 20000131T090000Z is before 2000 9:00 AM EST
January 31 -- it corresponds to TZID=US-Eastern:20000131T040000.  Thus, the
last occurence of this event should be 2000 9:00 AM EST January 30.  (Note
also that the time zone abbreviation is wrong for these examples.)

Similarly, 19970902T170000Z is TZID=US-Eastern:19970902T130000, so the last
occurence of the final recurrence should be September 2, 1997 EDT 12:00.

Unless, of course, the intent of the spec is that UNTIL is specified with a
Z, but it should nonetheless be interpreted as the same TZID as DTSTART.  (I
find this ... unlikely.)

Comments?  What was the motivation behind UNTIL-is-always-UTC, anyway?

-- 
Jonathan Lennox
[email-masked]

---

From: "Graham Gilmore" <[email-masked]>
Date: Mon, 9 Jul 2001 11:25:38 -0400

----- Original Message -----
From: "Jonathan Lennox" <[email-masked]>
To: <[email-masked]>
Sent: 08 July, 2001 23:19
Subject: Bugs(?) in RFC 2445 RECUR examples

> results as RFC 2445 specifies.  On investigating, I think this is
actually
[snip]
> Comments?  What was the motivation behind UNTIL-is-always-UTC, anyway?

    Looks like a couple of incorrect examples.  Probably the UNTIL part
should be fixed.

    As for having UNTIL in UTC, a value in UTC always represents one
single instant; if local time were used, then due to daylight shifts, a
particular value could represent 1, 2, or a non-existant instant.

    Graham

---

From: Jonathan Lennox <[email-masked]>
Date: Mon, 9 Jul 2001 12:18:57 -0400 (EDT)

>     Looks like a couple of incorrect examples.  Probably the UNTIL part

Yes, that's what I thought.

> particular value could represent 1, 2, or a non-existant instant.

But the same thing's true for every other DATE-TIME in a recurrence
(DTSTART, DTEND, etc.) -- and indeed in a calendar object.  Why is UNTIL
special?

I proposed some wording to this list a month or so ago saying that a
DATE-TIME value with a TZID SHOULD NOT specify an ambiguous time, and MUST
NOT specify a non-existent time; COS-interpreting applications MAY interpret
an ambiguous time as any of the possibile occurences of it.  I feel this is
a better general solution to this problem.

-- 
Jonathan Lennox
[email-masked]