Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#618 closed defect (fixed) bug ..

Reported by: [email protected] Owned by: mumme
Priority: high Milestone:
Component: General Version: 0.2
Keywords: Cc:
Blocked By: Blocking:

Description 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.


return Date(0), string);


return 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 16 years ago by Tom Trenka

Milestone: 0.3release

comment:2 Changed 16 years ago by [email protected]

Owner: changed from anonymous to mumme

comment:3 Changed 16 years ago by [email protected]

Resolution: fixed
Status: newclosed

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)

new Date(0, 0, 0, 0, 0, 0) = Sun Dec 31 1899 00:00:00 GMT+0100
new Date(0, 0) = Mon Jan 01 1900 00:00:00 GMT+0100

*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

comment:4 Changed 15 years ago by (none)

Milestone: 0.3release

Milestone 0.3release deleted

Note: See TracTickets for help on using tickets.