Closed Bug 332868 Opened 18 years ago Closed 18 years ago

Local calendar events displayed 1 hour earlier

Categories

(Calendar :: General, defect)

x86
Windows XP
defect
Not set
major

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: Aleks.Ehrlich, Unassigned)

References

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

Calendar event created for 21:55-22:00 displays in views (day view, week view, tooltip in the views, event list) as event for 20:55-21:00. In the event edit window times are displayed properly. Alarm fires at proper time.

Sunbird 0.3a1+ (binary build of 04.04.2006).

Reproducible: Always

Steps to Reproduce:
1. Create an event starting 21:55, ending 22:00 (have also tried 13:00-14:00), save it by pressing Ok.
2. Look at the day in question in the Day View, for example. Observe that the event is show at wrong time (1 hour earlier than actual).
3. Open the event and observe that in the event window the start and end times are still 21:55-22:00.
Actual Results:  
Calendar event in Day or Week view, in tooltip on those views, in the event list is shown as starting 1 hour earlier than entered.

Expected Results:  
Calendar event in Views and event list should show correct start and end times.

Checking/unchecking "Store dates in Universal Time" does not affect the probelm.
Worked with local calendar.
Maybe this is a daylight saving issue?
This same error occurs with remote calendars under both XP and Linux.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060403 Mozilla Sunbird/0.3a1+

Windows version has same build date.
(In reply to comment #1)
> Maybe this is a daylight saving issue?
> 

Times are OK here, local time is Europe/Amsterdam.
Our daylight saving time started last Sunday of March.

Preference 'Store Dates in Universal Time' is ON (checked).

On MacOS 10.3.9
Attached image Sunbird Event Editor (obsolete) —
Fedora Core 5
Sunbird Timezone set for America / Halifax
Fedora Timezone set for Moncton - Atlantic Time - New Brunswick
(these are the same time zone)

The next attachment will show how the event appears in the calendar.

The time entered is stored in the ics file as
BEGIN:VEVENT
CREATED:20060410T225617Z
LAST-MODIFIED:20060410T225750Z
DTSTAMP:20060410T225750Z
UID:uuid1144709870551
SUMMARY:Test May 1st
PRIORITY:0
CLASS:PUBLIC
DTSTART;TZID=/mozilla.org/20050126_1/America/Asuncion:20060501T170000
DTEND;TZID=/mozilla.org/20050126_1/America/Asuncion:20060501T180000
END:VEVENT

So it appears that time in the file matches the time shown on the calendar, but the time in the event editor has 1 hr added (DST?), and alarms are based on the time in the event editor.
I'd like to try to fix this issue before releasing. I'm not sure what the real issue is (timezone guessing, data calculation, usage of .jsDate), but lets try to fix this soon anyway. (there are also some other bugs on a similar, if not the same) problem.
(In reply to comment #6)
> I'd like to try to fix this issue before releasing. I'm not sure what the real
> issue is (timezone guessing, data calculation, usage of .jsDate), but lets try
> to fix this soon anyway. (there are also some other bugs on a similar, if not
> the same) problem.
> 
I wonder if activating the tz-picker would help?  My fear is that there isn't a solution for previously entered events, if they've ended up in the wrong tz.
I can confirm this error with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060418 Mozilla Sunbird/0.3a1+.

The error only occurs if I disable the 'Automatic adjustment for daylight saving time' setting in Windows and only for events that happen during DST.

The error description is the same as in Bug 326868 that was marked as duplicate of Bug 296659.

(In reply to comment #7)
> I wonder if activating the tz-picker would help?

My system timezone is Europe/Berlin. In Sunbird "calendar.timezone.local" is set to "/mozilla.org/20050126_1/Europe/Berlin". So no, it does not help.
The problem is in calIDateTime.jsDate. try this testcase:
var d = Components.classes["@mozilla.org/calendar/datetime;1"].createInstance(Components.interfaces.calIDateTime);d.year=2006;d.month=6;d.day=10;d.hour=10;d.normalize();d.jsDate
(in the js console)

On windows, the timezone the .jsdate is in, depends on the state of the 'autoadjust for dst' setting in windows. For me, it's UTC+1 or UTC+2. Which means it gets the wrong hour when the setting is off.
Aleks Ehrlich: can you confirm that switching on 'automaticly adjust for daylight saving time' makes the problem go away?
If so, we have a workaround, and this bug can be removed from the blocker list (once we added something about it to the release notes)
I can confirm that switching on 'automaticly adjust for daylight saving time' does NOT eliminate the problem. Actually, I reported this bug when daylight saving was ON.
Did you re-test with a current nightly? It might also be related to bug 333717, which has a partial patch, and shouldn't cause problems anymore with sunbird-generated events.
I have just tried the Linux nightly build and nothing has changed.
Oh, man. This are actually two bugs. Danny, please file a new bug for your issue. It's unrelated to the original bug. (it's likely because your system timezone isn't the same as the timezone set in sunbird)
Attachment #217943 - Attachment is obsolete: true
Attachment #217944 - Attachment is obsolete: true
Or maybe not. This bugs sucks.
Aleks: What is your timezone setting in windows, and what in sunbird? And how does the event look in the ics file?
I feel I should add to this even though my problem is slightly different - when reloading remote calendar (Which is Web Calendar) some times (note, only some times!) are displayed 1 hour ahead of what they should be. My timezone is set to +10 both on the web and in Mozilla Calendar. Please ask for any more details that might be helpful and I will email immediately (sorry I am new to this).
WebCalendar v1.1.0e-CVS (?? ??? 2006)/Apache
Mozilla Calendar 0.2.0.2006011612-cal
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Thunderbird/1.5.0.2
Windows XP Professional
 
Keith: you are using calendr 0.2, which is very old. Please re-test with a recent nighly build of sunbird or lightning.
(In reply to comment #17)
> Keith: you are using calendr 0.2, which is very old. Please re-test with a
> recent nighly build of sunbird or lightning.
> 

Thank you - I now have the latest lightening (26 April 2006, 07:53:23)and it is much faster too. All is well :-)
Using 20060427 build on Linux and the problem appears to be fixed. The time in the event listbox matches the time in calendar area, and this matches the time when editing the event, and this matches the time the alarm goes off.

After I installed the new build I had to reset my time zone and restart Sunbird, but after that it was OK except that I can now only edit a remote calendar once after starting Sunbird. Any further edits give a "Status code: 412: Precondition Failed", but that's another issue.

I will try a Windows build tomorrow.
tested in latest Sunbird nightly (20060428 Mozilla Sunbird/0.3a2), under windows

  Bug 328911 appears resolved.  (Current date indicator doesn't change ..)

Still have problem, previously noted in bug 328911, comment 10
> .. all-day events show as  12:00pm - 12:00pm (next day).  Later in year
> (after Oct-1, NZ daylight starts) they show as  01:00pm - 01:00pm (next day).
Note: same time shift (UTC, instead of local) as was 'current date indicator'

Not sure if this bug is the root cause, or we need to open a new bug
Per comment 20

Seperating this to NEW bug 335882 (trivial), as minor variation of bug 328911.
given comment #19, I don't see any reason for this bug to stay open.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
Per comment 23

Which Sunbird nightly release, on what platform?  Also: what location, what local timezone, what windows settings and/or sunbird settings?  Is this a northern hemisphere thing (eg. only during  Summer/Daylight  time)?

This work correctly (WFM), with identical test data (newly created event: 11:30AM-12:30PM 17/07/2006 'test 332868') on latest nightly for Sunbird under W2K.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: