Closed Bug 307518 Opened 19 years ago Closed 19 years ago

Copy/paste event changes time by -6 hours

Categories

(Calendar :: Sunbird Only, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lhabib, Assigned: mostafah)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

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.
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
Attached patch use floating datetime (obsolete) — — Splinter Review
This seems to fix things for me, since now they're both floating.
Attachment #195280 - Flags: first-review?(mvl)
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 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 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)
Attachment #195280 - Attachment is obsolete: true
Attachment #195280 - Flags: first-review?(mvl)
Attached patch set timezone too — — Splinter Review
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+
patch checked in.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: