Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#8521 closed defect (fixed)

[patch][ccla]DateTextBox: shows duplicate dates in some timezones.

Reported by: yoman Owned by: Adam Peller
Priority: high Milestone: 1.3
Component: Dijit - Form Version: 1.2.0
Keywords: Cc: Bryan Forbes
Blocked By: Blocking:

Description (last modified by bill)

On you desktop PC go to control Panel > Date,Time,Language,and Regional Options > Change the date and time > Choose “(GMT-4:00)Santiago” On your page, if you have a datebox, open it and navigate to October 2008, oct 10 appear twice, while Oct 11 is missing:

I found out what is causing this problem: In Santiago timezone (also Manaus and Brasilia) they are changing to daylight savings time at 12 AM which causes the javascript new Date() to fail and return the previous day, as 12AM 11 Oct 2008 isn't a valid date.

Attachments (2)

calendar.jpg (10.4 KB) - added by yoman 10 years ago.
brazilcal.patch (595 bytes) - added by Adam Peller 10 years ago.
Use 1AM for all Date calculations to avoid DST problems

Download all attachments as: .zip

Change History (8)

Changed 10 years ago by yoman

Attachment: calendar.jpg added

comment:1 Changed 10 years ago by bill

Description: modified (diff)
Owner: set to Adam Peller
Summary: DateTextBox shows duplicate dates in some tiemzones.DateTextBox: shows duplicate dates in some timezones.

comment:2 Changed 10 years ago by Adam Peller

Cc: Bryan Forbes added

Did you mean October 2009, as pictured? I can't seem to recreate this on a Mac. Is it dependent on the time of day you run the test? I think there was another ticket on this somewhere.

I wonder if using "12:01AM" in the Date object we use to calculate days on the calendar would solve the problem without breaking something else?

Changed 10 years ago by Adam Peller

Attachment: brazilcal.patch added

Use 1AM for all Date calculations to avoid DST problems

comment:3 Changed 10 years ago by Adam Peller

Milestone: tbd1.3
Summary: DateTextBox: shows duplicate dates in some timezones.[patch][ccla]DateTextBox: shows duplicate dates in some timezones.

comment:4 Changed 10 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [16595]) Avoid Brazilian DST problem (DST occurs at 12AM) Fixes #8521 !strict

comment:5 Changed 10 years ago by Adam Peller

(In [17690]) Use 1am for date-timese where midnight is a dst leap. Fixes #9366, Refs #8521 !strict

comment:6 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.