Opened 11 years ago

Closed 8 years ago

Last modified 8 years ago

#9107 closed defect (wontfix)

TimeTextBox fails for some timezones using Firefox on nonWindows

Reported by: Douglas Hays Owned by: Douglas Hays
Priority: high Milestone: 1.7
Component: Dijit - Form Version: 1.3.0
Keywords: Cc:
Blocked By: Blocking:

Description

I'm testing on Mac OS/X and using Firefox 3. Set the timezone to anything east of GMT (I selected BST). Run test_TimeTextBox.html and click the textbox labeled "24 Hour Time with 1 Hour TimePicker?". The time intervals will be > 1 hour but should be 15 minutes. This seems to work OK on Windows. Fails on Ubuntu as well. The problem is that a date of Jan 1, 1970 is used by dojo.date.stamp.fromISOString, but midnight in BST (passed to the method) is a negative time relative to midnight GMT and thus bad things happen.

Attachments (1)

9107.patch (1.9 KB) - added by Douglas Hays 11 years ago.
workaround to fromISOstring returning incorrect Date objects

Download all attachments as: .zip

Change History (13)

comment:1 Changed 11 years ago by Douglas Hays

Cc: Adam Peller added

fromISOstring calls new Date(1970, 0, 1, 0, 15, 0, 0) for T00:15:00 and new Date(1970, 0, 1, 1, 15, 0, 0) for T01:15:00, but both Date objects return 1 for getHours().

comment:2 Changed 11 years ago by Adam Peller

Changed 11 years ago by Douglas Hays

Attachment: 9107.patch added

workaround to fromISOstring returning incorrect Date objects

comment:3 Changed 11 years ago by Douglas Hays

Cc: Adam Peller removed
Owner: changed from Douglas Hays to Adam Peller

Entering 12:30 AM manually in the TimeTextBox? calls dojo.date.locale.parse which returns a Date object containing 1:30AM, so a dijit workaround is insufficient. Short of getting a fix from Firefox, either changing the default date to Jan 2, 1970 in both dojo and dijit, or just changing it for timezones east of GMT (more code, less impact), may be the only options to fix this. I guess it's also possible that if parse adds an additional defaultDate parameter similar to fromISOstring that dijit's TimeTextBox? could make use of this.

comment:4 Changed 10 years ago by bill

See also #8521, #9366.

comment:5 Changed 10 years ago by bill

Milestone: tbdfuture

comment:6 Changed 10 years ago by Adam Peller

Milestone: futuretbd

comment:7 Changed 10 years ago by Adam Peller

is there a related daylight savings issue here for TimeTextBox?, in general? Without specifying a date, the timezone is going to be wrong half the time where daylight savings is observed.

comment:8 Changed 9 years ago by Adam Peller

Owner: Adam Peller deleted

assigning all Dijit bugs to Bill

comment:9 Changed 8 years ago by bill

Component: DijitDijit - Form
Owner: set to Douglas Hays

comment:10 Changed 8 years ago by Douglas Hays

Milestone: tbd1.8

comment:11 Changed 8 years ago by Douglas Hays

Milestone: 1.81.7
Resolution: wontfix
Status: newclosed

I tried this on OSX 10.6.8 using FF 4.0 + Dojo 1.7.0 with timezone=GMT+0100 (Madrid, Spain) and it's working OK. If there's another specific timezone that fails, then it's probably a wontfix.

comment:12 Changed 8 years ago by bill

See #12021, this will be fixed in 2.0.

Note: See TracTickets for help on using tickets.