This will fix ecma/Date/15.9.4.3.js ecma/Date/15.9.5.28-1.js There seems to be a problem with daylight savings when a time change crosses the daylight savings start/ end dates.
(In reply to comment #0) FYI, Mac IE has the same problem. Win IE and Mac FF don't.
Adding this before the return in KJS::makeTime() fixes it for me: // Determine if we passed over a DST change boundary if (!utc) { time_t tval = mktime(t) + utcOffset + int((ms + yearOffset)/1000); struct tm t3; localtime_r(&tval, &t3); t->tm_isdst = t3.tm_isdst; } Does not seem to introduce any regressions. I am a bit worried about overflow and rounding though. It might break down very close to the changeover period.
Created attachment 4271 [details] Patch Implemented George's suggestion.
Comment on attachment 4271 [details] Patch What's the rationale for calling the local variable "t3"? The FIXME says "on some systems", but this will happen on all systems; there's no system where time_t has enough range to include all the years we want our function to handle. So I suggest re-wording it. Otherwise, looks fine.
There is already a t and a t2, and although t3 wasn't perhaps the best sequel, I didn't see fit to leave it out. :-) And yes, "all systems" is correct. I don't know if it's a realistic problem to put more effort into at this time though.
I checked this in. It did fix ecma/Date/15.9.5.28-1.js, but ecma/Date/15.9.4.3.js was apparently fixed by some earlier checkin.