Last Comment Bug 594403 - Modifying the start date of a new All day event causes the timezone link activation and a change in the timepicker of the end date
: Modifying the start date of a new All day event causes the timezone link acti...
Status: RESOLVED FIXED
:
Product: Calendar
Classification: Client Software
Component: Dialogs (show other bugs)
: Trunk
: All All
: -- normal (vote)
: 1.0b3
Assigned To: Decathlon
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-08 08:50 PDT by Decathlon
Modified: 2013-02-21 22:56 PST (History)
0 users
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Decathlon 2010-09-08 08:50:52 PDT
Reproducible: Always

Steps to reproduce:
1. create a new event;
2. click on menu Options->Timezone;
3. click on the "All day event" checkbox;
4. click on the "Start date" datepicker;


Actual result:
the end date timepicker is disabled but its time changes from 0:00 to 1:00, moreover, after step 4, the timezone text of the end date changes from "Local time" to the default timezone defined in Lightning, and becomes enabled allowing to select a different timezone. If this happens, the event will be saved with an end date in the date-only format but with a time zone identifier TZID e.g.

  DTSTART;VALUE=DATE:20100915
  DTEND;VALUE=DATE;TZID=America/Argentina/San_Juan:20100916

that shouldn't be allowed (bug 388656).


Expected results:
the event is an All day one, hence the timepickers should always show the time 0:00 and the timezone links should always be disabled in order to avoid to select a Time Zone Identifier.


In general, changing the start and the end time, before performing step 3 in s.t.r., causes the datepicker issue with a time that is the difference between the end time and the start time e.g. if you set a start-end time to 3:05-5:45, the end timepicker will show 2:40 instead of 0:00.

Without changes to the timezone, the event just created is corrected; reopening the event, both timepickers show correctly the time 0:00.

Not completely sure if it has been already reported because Lightning 0.9 too has this bug.
Comment 1 Decathlon 2010-09-08 11:14:01 PDT
Actually in steps to reproduce, after step 4 the text link doesn't change to the default timezone defined in Lightning, but it remains "Local time", though it becomes enabled.
Comment 2 Decathlon 2010-09-21 15:56:41 PDT
The problem here is that when the function updateTimezone() is called, the variable gEndTime is date-time (isDate=0), instead it should be date only (isDate=1), and this causes the activation of the timezone link inside the function updateTimezone [1].
It seems that the wrong value comes from the function dateTimeControls2State()  because it updates gStartTime but not gEndTime when the event is an all day [2] 

[1]  http://mxr.mozilla.org/comm-central/source/calendar/base/content/dialogs/calendar-event-dialog.js#2681
[2]  http://mxr.mozilla.org/comm-central/source/calendar/base/content/dialogs/calendar-event-dialog.js#575.
Comment 3 Decathlon 2011-03-17 03:13:17 PDT
I added a fix for this bug in the patch(es) for Bug 366139.
If that patch won't be backed-out, this bug should be considered fixed.
Could someone please confirm?
Comment 4 Martin Schröder [:mschroeder] 2011-05-31 08:25:23 PDT
qawanted: Check if this has been already fixed. (per comment#3)
Comment 5 Decathlon 2013-02-17 03:40:33 PST
By now this bug doesn't exist anymore. It has been fixed with patches for bug 366139.
Comment 6 Decathlon 2013-02-17 03:44:36 PST
The target milestone should be the same of bug 366139, right?
Comment 7 Philipp Kewisch [:Fallen] 2013-02-21 22:56:33 PST
Yes, target milestone and assignee.

Note You need to log in before you can comment on or make changes to this bug.