#618 closed defect (fixed)
dojo.date.fromIso8601 bug ..
Reported by: | Owned by: | mumme | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | General | Version: | 0.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
dojo.date.fromIso8601 uses new Date(0) to create a date. Date(0) creates a date in UTC .. When using the date returned from this function it will apply your timezone offset (internally by Javascript). This is probably not what the author intended.
Replace
return dojo.date.setIso8601(new Date(0), string);
With
return dojo.date.setIso8601(new Date(0,0,0,0,0,0), string);
Since Date(0,0,0,0,0,0) will create a date in your local timezone and no timezone futzing will be applied ..
Happy dojoing :-)
cheers r
Change History (4)
comment:1 Changed 15 years ago by
Milestone: | → 0.3release |
---|
comment:2 Changed 15 years ago by
Owner: | changed from anonymous to mumme |
---|
comment:3 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Actually I cant see any difference at all in the return value.
According to ECMA standards a different internal method will be used when new Date is called with 2 - 7 arguments, so I ended up only doing Date(0, 0)
*in my timezone*
The timezone is the same as you can see, only one date of and the dates will be changed in the setIso8601Date function anyways.
So hopefully this will be fixed as of rev3875
Please reopen if not.
Regards Fredrik Johansson