Copy/paste event changes time by -6 hours

RESOLVED FIXED

Status

Calendar
Sunbird Only
RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: jrx, Assigned: Mostafa Hosseini)

Tracking

({regression})

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.11 KB, patch
Michiel van Leeuwen (email: mvl+moz@)
: first-review+
Details | Diff | Splinter Review
(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050908 Mozilla Sunbird/0.2+

Copying and pasting an event changes the start and end times of the event by -6
hours.  (However, if you copy the pasted event (with the new time) and paste it
AGAIN, the time is not changed (stays with the new time).)

Reproducible with a clean profile.

Reproducible: Always

Steps to Reproduce:
1.Create event
2.Copy event with context menu or Ctrl-C
3.Paste event with context menu or Ctrl-V

Actual Results:  
Event times are changed by -6 hrs (e.g. if I have an event starting at 3pm and
copy/paste it to another day, the pasted event starts at 9am).

Expected Results:  
The pasted event should have the same times as the copied event.

Comment 1

13 years ago
Confirming.  Regression likely caused by switching to floating date/time as default.

Reporter: Can you confirm that your timezone offset is GMT-6?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression

Comment 2

13 years ago
Created attachment 195280 [details] [diff] [review]
use floating datetime

This seems to fix things for me, since now they're both floating.
Attachment #195280 - Flags: first-review?(mvl)
(Reporter)

Comment 3

13 years ago
My system clock is GMT-7 hours (with Daylight Savings activated).  
I tried changing my system clock to GMT-3 hrs (with DST).  Now copying and
pasting changes the time by -3 hrs.

Strangely, changing the system clock and closing/reopening Sunbird results in
the pasted events changing their time by the difference in the system clock.

Comment 4

13 years ago
Comment on attachment 195280 [details] [diff] [review]
use floating datetime

Removing this while I further investigate the last comment
Attachment #195280 - Attachment is obsolete: true
Attachment #195280 - Flags: first-review?(mvl)
(In reply to comment #3)
> Strangely, changing the system clock and closing/reopening Sunbird results in
> the pasted events changing their time by the difference in the system clock.

I think that's some weird interplay between the timezone setting from the
preferences (or the guessed one) and the timezone javascript uses.

Comment 6

13 years ago
Comment on attachment 195280 [details] [diff] [review]
use floating datetime

OK, I do think this is the correct fix.  The moving events was caused by the
fact that we previously created these events in your particular timezone. 
Changing timezones, Sunbird adjusted the events appropriately.	However, for
0.3a1, we're just going to make all events 'floating' and this brings cut+paste
in line with the rest of the event-creation mechanisms.
Attachment #195280 - Attachment is obsolete: false
Attachment #195280 - Flags: first-review?(mvl)
Comment on attachment 195280 [details] [diff] [review]
use floating datetime

Why not put the new event in the same timezone as the original event? (which is
usually floating at the moment, but might not always be)

Updated

13 years ago
Attachment #195280 - Attachment is obsolete: true
Attachment #195280 - Flags: first-review?(mvl)

Comment 8

13 years ago
Created attachment 196757 [details] [diff] [review]
set timezone too

As suggested, this patch fixes the problem by copying over the old timezone
information to the new, pasted event.
Attachment #196757 - Flags: first-review?(mvl)
Attachment #196757 - Flags: first-review?(mvl) → first-review+

Comment 9

13 years ago
patch checked in.
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.