Updates:
        Status: Assigned
        Owner: [email protected]
        Labels: Type-Bug Priority-Medium OS-Windows

Comment #2 on issue 1386 by [email protected]: new Date() returns invalid time zone offset, and hour field
http://code.google.com/p/v8/issues/detail?id=1386

We need to use the localtime() function because we need the actual local time corresponding to a given UTC time, including the daylight savings offset, and including effects due to historical changes in time zones and daylight savings. The tzinfo Bias field just reflects the current time zone, without DST.

The existing code should work on your system, so we would like to find out why it doesn't. If you change your time zone, using the OS, then then new information will not be available until you refresh the tab, or even reopen the page, because the sandbox prevents the renderer process from accessing a new DLL (the new time zone info is in a DLL) that was not already attached when the sandbox was created.

Could you verify that the wrong answer is being given for other dates, besides the current date? Looking at the code, it looks like dates after 2038 will be in GMT, incorrectly. Make sure that the browser has been restarted after you change the time zone. Also check other time zones to see if the problem occurs for them.

If you are using the V8 library directly, then the sandboxing shouldn't be an issue. Is this in a browser, or in the V8 shell, or another use?


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to