Closed Bug 369043 Opened 18 years ago Closed 14 years ago

Events displayed on incorrect date when crossing midnight in UTC

Categories

(Calendar :: Calendar Frontend, defect)

Lightning 0.3.1
x86
Linux
defect
Not set
major

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: kfulks, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20070126 Ubuntu/dapper-security Firefox/1.5.0.9
Build Identifier: Lightning 0.3.1pre and Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20061006 Sunbird/0.3

If a repeating event is schedule in such a way that it will be stored on the next day in UTC time, it will display incorrectly on repeating dates.  I am in CST and this data will cause the problem.  There are two events one at 6:00 PM and one at 5:00 PM CST, the 5:00 PM event will display on the correct date, but the 6:00 PM event will be on Friday instead of Saturday.  I first noticed this using lightning to retrieve data from WebCalendar.
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
BEGIN:VEVENT
CREATED:20070202T040838Z
LAST-MODIFIED:20070202T041041Z
DTSTAMP:20070202T041041Z
UID:uuid1170389368013
SUMMARY:Test 6:00 PM
PRIORITY:9
STATUS:CONFIRMED
CLASS:PUBLIC
DTSTART:20060122T000000Z
DTEND:20060122T030000Z
RRULE:FREQ=MONTHLY;BYDAY=3SA;UNTIL=20071231T000000Z
LOCATION:Here
DESCRIPTION:This is a test appointment for 6:00 PM that should be wrong 
 hopefully
END:VEVENT
BEGIN:VEVENT
CREATED:20070202T040838Z
LAST-MODIFIED:20070202T041041Z
DTSTAMP:20070202T041041Z
UID:uuid1170389368014
SUMMARY:Test 5:00 PM
PRIORITY:9
STATUS:CONFIRMED
CLASS:PUBLIC
DTSTART:20060121T230000Z
DTEND:20060122T020000Z
RRULE:FREQ=MONTHLY;BYDAY=3SA;UNTIL=20071231T000000Z
LOCATION:Here
DESCRIPTION:This is a test appointment for 5:00 PM that should be right 
 hopefully
END:VEVENT
END:VCALENDAR


Reproducible: Always

Steps to Reproduce:
1.Enter repeating event into WebCalendar that will be later than midnight Zulu
2.View calendar in Lightning (or SunBird)
3.Notice that repeated events are display one day previous to where they should be.
Actual Results:  
The included file was built from data extracted from WebCalendar and will show the problem for anyone configured for CST.  One event will be displayed on Friday and one on Saturday.

Expected Results:  
In the above datafile, both events should be displayed on Saturday.
Version: unspecified → Lightning 0.3.1
Reproduced with Sunbird 0.3.1 release and with 0.5pre nightly.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20070213 Sunbird/0.3.1
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3pre) Gecko/20070310 Calendar/0.5pre

I'm not convinced that .ics is correct or not, but kelly's bug description is perfectly true.

Timezone Setteing:
Machine timezone: America/North_Dakota/New_Salem (Debian/testing tzdata 2007b-1)
Sunbird timezone: America/North_Dakota/New_Salem

Notes:
Probably due to something other problems,
'Test 5:00 PM' event is shown as 06:00 PM -- 09:00 PM (on Saturday),
'Test 6:00 PM' event is shown as 07:00 PM -- 10:00 PM (on Friday)
Marking as New now that skuribay confirmed it.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I also tested using Europe/Berlin, timezone offset is UTC+1 for events in March:

'Test 5:00 PM' event is shown as 00:00 AM -- 03:00 AM (on Sunday)
'Test 6:00 PM' event is shown as 01:00 AM -- 04:00 AM (on Saturday)

This is correct according to the event definition:

For 'Test 5:00 PM' event:

  DTSTART:20060121T230000Z
  RRULE:FREQ=MONTHLY;BYDAY=3SA;UNTIL=20071231T000000Z

  --> repeat every third Saturday in month at 23:00 (11:00 PM) UTC
  --> this is Sunday   00:00 (00:00 AM) in Europe/Berlin
  --> this is Saturday 18:00 (06:00 AM) in America/North_Dakota/New_Salem

For 'Test 6:00 PM' event:

  DTSTART:20060122T000000Z
  RRULE:FREQ=MONTHLY;BYDAY=3SA;UNTIL=20071231T000000Z

  --> repeat every third Saturday in month at 00:00 (00:00 AM) UTC
  --> this is Saturday 01:00 (01:00 AM) in Europe/Berlin
  --> this is Friday   19:00 (07:00 PM) in America/North_Dakota/New_Salem

I think Sunbird displays the event as specified by the ics file.
related to Bug 357383?
i think its the same problem with 0.5pre nightly here.

When crossing midnight the "Agenda"-display becomes wrong-, the today and tomorrow-items keep showing things like before midnight.

Only restart of Thunderbird helps.
(In reply to comment #5)
Michael, you are probably seeing Bug 357079.

(In reply to comment #3)
In my opinion Lightning displays the events as specified in the .ics file and this bug report is invalid -> [qa discussion needed]
Whiteboard: [qa discussion needed]
> (In reply to comment #3)
> In my opinion Lightning displays the events as specified in the .ics file and
> this bug report is invalid -> [qa discussion needed]
The events as specified in the file are slightly invalid. The first event specifies a rule to recur every saturday, but then starts on a Sunday.

However, I have corrected these issues and found what I believe is the heart of the problem.

== STR ==
1. Set your OS and Sunbird timezone to America/San Francisco (or America/Los Angeles).
2. Use this link to verify the times: http://www.timeanddate.com/worldclock/meetingtime.html?month=5&day=11&year=2007&p2=224&iv=0
3. Use File->Open to open the attached ICS file.
4. Now, the "check 1" event only has a duration of 2 hours (from 00:00 to 02:00) but it is displayed as spanning Friday and Saturday.  It *should* be displayed on Friday from 5PM to 7PM when this timezone is in DST (in May 2007).
5. Note that the "check 2" event is properly displayed.

So the we have a problem with the original UTC time spans over the 00:00 boundry AND the local time does not.
Whiteboard: [qa discussion needed]
needs investigation
Flags: wanted-calendar0.9+
Flags: wanted-calendar0.9+ → wanted-calendar1.0+
(In reply to comment #7)
> 4. Now, the "check 1" event only has a duration of 2 hours (from 00:00 to
> 02:00) but it is displayed as spanning Friday and Saturday.  It *should* be
> displayed on Friday from 5PM to 7PM when this timezone is in DST (in May 2007).

The test event "check 1" has a duration of 26 hours:

DTSTART:20060121T000000Z
DTEND:20060122T020000Z

So I think there is no bug here. It is expected to span Friday and Saturday (in America/Los Angeles time). Does anyone disagree?
I don't know about the specific example given above, but I'm pretty sure there is a bug in the code somewhere. I too experience problems with events that are starting past midnight UTC.
This ics file: 
BEGIN:VCALENDAR

VERSION:2.0

X-WR-CALNAME:1st Cobblehill

PRODID:-//The Horde Project//Horde_iCalendar Library\, Horde 3.3.5//EN

METHOD:PUBLISH

BEGIN:VEVENT

DTSTART:20091113T230000Z

DTEND:20091114T003000Z

DTSTAMP:20091022T025205Z

UID:e0013c96-d495-4c53-9fcc-2c884be4c313

CREATED:20091022T025030Z

LAST-MODIFIED:20091022T025030Z

SUMMARY:test crossing utc midnight

ORGANIZER;CN=Dewi Griffiths:mailto:dewi@brentwood.bc.ca

CATEGORIES:Anniversary

LOCATION:home

CLASS:PUBLIC

STATUS:CONFIRMED

TRANSP:OPAQUE

RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=FR;COUNT=5

END:VEVENT

BEGIN:VEVENT

DTSTART:20091113T220000Z

DTEND:20091113T235000Z

DTSTAMP:20091022T025205Z

UID:09e57a79-7502-464a-be75-0a24d2c8192c

CREATED:20091022T024659Z

LAST-MODIFIED:20091022T024754Z

SUMMARY:test before midnight UTC

ORGANIZER;CN=Dewi Griffiths:mailto:dewi@brentwood.bc.ca

CATEGORIES:Birthday

LOCATION:home

CLASS:PUBLIC

STATUS:CONFIRMED

TRANSP:OPAQUE

RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=FR;COUNT=5

END:VEVENT

DTSTART:20091114T000500Z

DTEND:20091114T010500Z

DTSTAMP:20091022T025205Z

UID:4bb14820-ff43-4035-866a-4eefc04d2307

CREATED:20091022T024754Z

LAST-MODIFIED:20091022T024845Z

SUMMARY:test after midnight utc

ORGANIZER;CN=Dewi Griffiths:mailto:dewi@brentwood.bc.ca

CATEGORIES:Business

LOCATION:home

CLASS:PUBLIC

STATUS:CONFIRMED

TRANSP:OPAQUE

RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=FR;COUNT=5

END:VEVENT

END:VCALENDAR


defines 3 different repeating events. One starts and ends before 00:00 UTC, one spans 00:00 UTC. the other starts and ends after 00:00 UTC.

Both events which start before 00:00 UTC display correctly in lightning. The on ethat starts after 00:00 UTC displays correctly for the FIRST occurrence, but then displays on the previous day for all further occurrences. 
We are in America/Vancouver TZ. Both lightning and our web calendar are in the correct timezone, but the web calendar exports all ics events in UTC (Z) timings.
These events are ALL supposed to display on FRIDAY, the 2nd through 5th event of the ones that start after 00:00 UTC, display on THURSDAY
Thunderbird version 2.0.0.23 (20090817)
Lightning 0.9 build 2009040813
No, I think everything behaves as specified in the iCalendar sample.

DTSTART specifies the date and time of the first occurrence. 
DTSTART specifies the time of the following occurences. 
RRULE specifies the date of the following occurences.

Example 1 'test before midnight UTC'

 DTSTART:20091113T220000Z
 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=FR;COUNT=5

 -> 1. occ.: Friday, 2009-11-13 22:00 UTC --> Friday 15:00 in Vancouver
 -> 2. occ.: Friday, 2009-11-20 22:00 UTC --> Friday 15:00 in Vancouver
 -> 3. occ.: Friday, 2009-11-27 22:00 UTC --> Friday 15:00 in Vancouver
 ...

Example 2: 'test after midnight utc'

 DTSTART:20091114T000500Z
 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=FR;COUNT=5

 -> 1. occ.: Sunday, 2009-11-14 00:05 UTC --> Friday   17:05 in Vancouver
 -> 2. occ.: Friday, 2009-11-20 00:05 UTC --> Thursday 17:05 in Vancouver
 -> 3. occ.: Friday, 2009-11-27 00:05 UTC --> Thursday 17:05 in Vancouver
 ...
This sounds like a lot of WFM for me. Please reopen if this problem still exists in 1.0b1 or later.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: