Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#817 closed defect (fixed)

dojo.date.setIso8601Time() ignores timezone

Reported by: tim@… Owned by: dylan
Priority: high Milestone:
Component: Core Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

dojo.date.setIso8601Time() goes to the trouble of figuring out the timezone offset -- then does nothing with it.

The simple fix is to actually use the correctly calculated offset to change the returned date, i.e., change:

dateObject.setHours(hours);
dateObject.setMinutes(mins);
dateObject.setSeconds(secs);
dateObject.setMilliseconds(ms);

return dateObject;

to:

dateObject.setHours(hours);
dateObject.setMinutes(mins);
dateObject.setSeconds(secs);
dateObject.setMilliseconds(ms);

if (offset != 0) {
	dateObject.setTime(dateObject.getTime() + offset * 60000);
}

return dateObject;

Change History (3)

comment:1 Changed 13 years ago by dylan

Component: GeneralCore
Milestone: 0.4
Owner: changed from anonymous to dylan
Status: newassigned

I actually undid this as there were cases where it was applying the timezone twice.

As shown in #588, there are several issues with timezones and time in general that need to be worked out.

comment:2 Changed 13 years ago by dylan

Resolution: fixed
Status: assignedclosed

fixed in [4424]

comment:3 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.