Closed Bug 369270 Opened 18 years ago Closed 18 years ago

Dates of events changes after upgrading from 0.3 to 0.3.1

Categories

(Calendar :: General, defect)

defect
Not set
critical

Tracking

(Not tracked)

VERIFIED FIXED
Sunbird 0.3

People

(Reporter: omar.bajraszewski, Assigned: mattwillis)

Details

(Whiteboard: [verified0.3.1])

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
Build Identifier: 

I updated Sunbird 0.3 to Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.9a1) Gecko/20070201 Sunbird/0.3.1 and after that most of the all day events that repeated every year (i.e. birthdays) changed dates one day earlier i.e. Valentines Day was shown on 13th of February. I didn't try to reproduce it. I had to edit all of my repeating events.

Reproducible: Didn't try
I've just noticed that all other events are shifted 1 hour earlier...
Summary: Updating to 0.3.1 causes changing the dates of recurrences → Dates of events changes after upgrading from 0.3 to 0.3.1
I created an all day event 'Premonition' with Sunbird 0.3. It was set for 16th of February. After updating to Sunbird 0.3.1 the event was shifted to 15th of February. I cannot drag&drop it. I had to edit it manually to change the date.
It looks like:
BEGIN:VEVENT
CREATED:20070205T185117Z
LAST-MODIFIED:20070205T185118Z
DTSTAMP:20070205T185117Z
UID:e4e0f167-ef27-4ff6-8349-e2a2e579128e
SUMMARY:Premonition
STATUS:TENTATIVE
CLASS:PUBLIC
DTSTART;VALUE=DATE:20070315
DTEND;VALUE=DATE:20070316
CATEGORIES:Kino
BEGIN:VALARM
TRIGGER;VALUE=DURATION:-P1W
DESCRIPTION:Mozilla Alarm: Premonition
ACTION:DISPLAY
END:VALARM
END:VEVENT

Attached image One of the changed events —
Confirmed: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20070205 Sunbird/0.3.1 (BuildID: 2007020505)

Steps:
1. Install Sunbird 0.3 on Windows XP (a windows XP without OS timezone update)
2. Set Sunbird timezone to (Europe/Warsaw) -- Omar is this your configuration? I guessed since your email address has a .pl suffix.
3. Set Windows XP to (GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb and check the "Automatically adjust clock for daylight savings time).
4. Restart Sunbird 0.3 and Create the following events:
----> Annual recurring all day event starting on February 16, 2006
----> Annual recurring event at 10PM (22:00) on February 16 (starting in 2006)
----> 9AM weekly recurring event that occurs every two weeks starting on March 2, 2006
----> Annual recurring all day event starting on March 16 2006.
5. Shut down Sunbird 0.3 and *install* Sunbird 0.3.1 using the windows installer
6. View the events in 2007.

Expected: Recurring events should not shift
Acutal: --> Recurring annual all day events shift one day earlier
        --> Recurring events with a time shift one hour earlier.
        --> Monthly and weekly recurring all day events do NOT shift (they are displayed correctly)

Other observations:
Non-recurring, non-all day events are shifted one hour earlier.  
Installing the Windows XP hotfix has no effect
Monthly all day recurring events (both by date and by day) are not affected.
Weekly all day recurring events are not affected

In Summary, these are the Affected Items:
* Non recurring events: shifted one hour earlier
* All recurring events with time are shifted one hour earlier
* All annual recurring all day events shift one day earlier



Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking-calendar0.3.1?
(In reply to comment #4)

> 2. Set Sunbird timezone to (Europe/Warsaw) -- Omar is this your configuration?
> I guessed since your email address has a .pl suffix.

yes, this is my configuration
Does this also happen in 0.5, and if so can we get a regression window?
blocking-calendar0.3.1+
Flags: blocking-calendar0.3.1? → blocking-calendar0.3.1+
If anyone has ideas for how to test for problems like this in an automated way, I would really appreciate hearing them. Please send to me at rkiddy@mozilla.com. Any idea, no matter how wacky or incomplete or vague, would be appreciated.

This is the kind of problem where it is hard to get human testing without a lot of thought and knowledge, but at the same time it is complicated enough that it is not easy to automate. Thanks.
GetTimeInTimezone doesn't use .Assign to set the timezone, so our tz migration code wasn't being called.

After discussion with mvl and dmose, we decided this was the best fix for 0.3.1.

We'll want a follow-up bug to deal with auditing the code and making sure there's no place else we missed, and perhaps to change the way we're doing the upgrading.
Assignee: nobody → lilmatt
Status: NEW → ASSIGNED
Attachment #254201 - Flags: second-review?(dmose)
Attachment #254201 - Flags: first-review?(ctalbert.moz)
Bug 368723 looks like a good one to handle the follow-up tasks.
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Sunbird 0.3
Comment on attachment 254201 [details] [diff] [review]
Get latest tzid before GetIcalTZ

This looks good. I built it on Windows, so that went well.  I don't have a 0.3.1 build to try it on, so I did not test it.  But, the fix does look like it will solve the problem.

One nit: instead of (rv!= NS_OK) use NS_FAILED(rv)  You do it right in one place and not in the other.

ctalbert r+ with that nit
Attachment #254201 - Flags: first-review?(ctalbert.moz) → first-review+
Comment on attachment 254201 [details] [diff] [review]
Get latest tzid before GetIcalTZ

Looks good; r=dmose.
Attachment #254201 - Flags: second-review?(dmose) → second-review+
Patch landed on:
  SUNBIRD_0_3_BRANCH
  LIGHTNING_0_3_BRANCH
  MOZILLA_1_8_BRANCH
  trunk

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [fixed0.3.1]
Verified on windows XP (with timezone fix): Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20070207 Sunbird/0.3.1

--> Verified?

I want Omar to confirm that it is fixed before marking verified since this is a crucial fix to the 0.3.1 release.
Whiteboard: [fixed0.3.1] → [verified0.3.1]
Seems to be alright :-) Verified with Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.9a1) Gecko/20070209 Sunbird/0.3.1
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: