Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#17387 closed defect (fixed)

duplicated 10:00:00 AM entries on TimeTextBox

Reported by: Changdong Li Owned by: Douglas Hays
Priority: undecided Milestone: 1.9.2
Component: Dijit - Form Version: 1.9.1
Keywords: Cc:
Blocked By: Blocking:

Description

to view this bug, just go to the current 1.9 version. e.g. http://download.dojotoolkit.org/release-1.9.1/dojo-release-1.9.1/dijit/tests/form/test_TimeTextBox.html

it is missing 23:00-24:00 date range.probably it's related to that duplicated entries.

can someone have a look? BTW I tested that in Chrome and Firefox.

thanks. Changdong Li

Attachments (2)

duplicated.png (28.2 KB) - added by Changdong Li 6 years ago.
show duplicated entries
compare.png (42.7 KB) - added by Changdong Li 6 years ago.
compare old dojo with the 1.9.0

Download all attachments as: .zip

Change History (15)

Changed 6 years ago by Changdong Li

Attachment: duplicated.png added

show duplicated entries

comment:1 Changed 6 years ago by bill

Owner: set to Changdong Li
Status: newpending

It works for me. What timezone are you in? China? And which platform are you running on, WinXP?

comment:2 Changed 6 years ago by Changdong Li

Status: pendingnew

thanks for your quick response! I'm in Australia. that is GMT+10, I'm running Ubuntu 12 64bit.

comment:3 Changed 6 years ago by Changdong Li

I tested on windows xp, it's fine on IE&Chrome&Firefox. however on Ubuntu, if I set my timezone to GMT+12, the duplicated entries become 12:00 PM. if I set my timezone to less than GMT+10, it works. weird and interesting!

Changed 6 years ago by Changdong Li

Attachment: compare.png added

compare old dojo with the 1.9.0

comment:4 Changed 6 years ago by Changdong Li

this bug is related to time zone and daylight saving,the old dojo has no such bug.see the screen shot compare old dojo with the 1.9.0. to fix this, just replace the current lines date.setTime(date.getTime() + incrementDate.getHours() * index * 3600000 + incrementDate.getMinutes() * index * 60000 + incrementDate.getSeconds() * index * 1000); with the old code date.setHours(date.getHours() + incrementDate.getHours() * index, date.getMinutes() + incrementDate.getMinutes() * index, date.getSeconds() + incrementDate.getSeconds() * index);

comment:5 Changed 6 years ago by bill

Sounds reasonable, which revision was that old code in though?

comment:6 Changed 6 years ago by Changdong Li

the old code can be found in the _TimePicker.js file in 1.7.2, the buggy lines are in the same file in 1.9.0 or 1.9.1

comment:7 Changed 6 years ago by Changdong Li

however setHours can be a problem for earlier chrome version, see https://code.google.com/p/v8/issues/detail?id=1945 that's why doughays changed setHours to setTime in revision [27946]. however setTime can be a bug for some timezones in Chrome. so the solution could be replace the buggy lines with date=new Date(date.getFullYear(),date.getMonth(),date.getDate(),incrementDate.getHours() * index,incrementDate.getMinutes() * index, incrementDate.getSeconds() * index,0)

Last edited 6 years ago by bill (previous) (diff)

comment:8 Changed 6 years ago by bill

Owner: changed from Changdong Li to Douglas Hays
Status: newassigned

OK, thanks for the thorough analysis. Giving this to Doug since he changed that code in [29746]. There's no need to support old versions of chrome, so it sounds like we could do either of your two suggestions, assuming they don't cause problems on other browsers.

comment:9 Changed 6 years ago by Douglas Hays

What version of Chrome on Ubuntu is having this problem? I wanted to make sure it wasn't an old version and maybe the setTime problem is already fixed in a later release of Chrome.

comment:10 Changed 6 years ago by Changdong Li

this bug happens in Linux chrome 28.0.1500.95 and Firefox 23.0 both are very new.

comment:11 Changed 6 years ago by Douglas Hays

Milestone: tbd1.9.2

Date.setHours was fixed in Chrome 17.0.963.65

comment:12 Changed 6 years ago by doughays-dojo <doughays@…>

Resolution: fixed
Status: assignedclosed

In b92ffd1b86275049dfded1c4efc245df0ecbfd31/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:13 Changed 6 years ago by doughays-dojo <doughays@…>

In 8e7feca3ee5ebe1d250fdbdcc31e3c1909c7be4a/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.