-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculation of daylight saving time is wrong #1661
Comments
Those tests are related the actual daylight saving adjustment. Related issue: jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: László Langó [email protected]
Those tests are related the actual daylight saving adjustment. Related issue: #1661 JerryScript-DCO-1.0-Signed-off-by: László Langó [email protected]
Can we do this? I mean countries just change their day-light saving system all the time, and figuring out what was in the past seems difficult. |
I don't know what we can do with this. It is really a difficult question, so I'm open for any good idea. |
Hm perhaps only one daylight saving could be enough, the local one. So we don't care about the physical location of the date. Perhaps we could add US daylight saving system for Jerry, and people could add more if they need it. |
Note that the standard explicitly deals with this:
(ES5.1 15.9.1.8) Thus, Jerry does not have to track the evolution of the daylight saving system. It can (actually, it should) project the system currently in effect back in the past. |
I think adding a comprehensive history may cause us to increase the size of the library. The standard makes it simpler to project today's rules into the past. |
Note that the spec has changed here as of ES6 [1]:
It changed again in ES9, the current draft is now very explicit again (and much more correct than in ES5):
I'm thinking of fixing this by changing
Note that this implementation is not quite correct - we always assume the given timestamp is in UTC, even if is_utc is false. The consequence here is that for times around the dst transition which are in localtime, we will return an offset that is off by an hour. However, it is an order of magnitude more correct than the current implementation, and the jerry_port interface allows for a completely correct interface to be implemented if a port author desired to implement one. (Even handling Lord Howe Island correctly!) [1] https://www.ecma-international.org/ecma-262/6.0/#sec-daylight-saving-time-adjustment |
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes jerryscript-project#1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
…timezones. (#2540) The previous jerry_port interface did not allow timezones to be handled correctly, even if the host system was up to the task. This PR changes the jerry_port interface to allow a completely correct implementation to exist, and provides one (for Linux/BSD systems) in default-date.c. Fixes #1661 JerryScript-DCO-1.0-Signed-off-by: crazy2be [email protected]
After the PST -> PDT change some of the test262 tests are failed. The reason is the wrong daylight saving time.
ecma_date_daylight_saving_ta
inecma-builtin-helpers-date.c
is get the daylight saving adjustment from the system, but it gets it for the current date and not for the date we must set (e.g.:new Date(1969, 12)
).The text was updated successfully, but these errors were encountered: