Calculation of daylight saving time is wrong #1661
After the PST -> PDT change some of the test262 tests are failed. The reason is the wrong daylight saving time.
referenced this issue
Mar 14, 2017
Note that the standard explicitly deals with this:
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.
Note that the spec has changed here as of ES6 :
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!)