We have an awkward problem with a couple of users in our organization. Let's say we can divide our user base in two populations:
- They are using some edition of Internet Explorer 11
- They are using some other edition of Internet Explorer 11. One difference we potentially see is that they are using the Dutch version of Internet Explorer 11.
We see the following behavior when trying out on the JavaScript console:
Testcase A
var x = new Date("1966-09-05")
new Intl.DateTimeFormat('nl-NL').format(x)
- Correct: "05-09-1966"
Correct: "05-09-1966"
x.toLocaleTimeString()
Correct: "02:00:00"
- Correct: "02:00:00"
Testcase B
var y = new Date(1966, 8, 5)
new Intl.DateTimeFormat('nl-NL').format(y)
- Correct: "05-09-1966"
- Incorrect: "04-09-1966"
y.toLocaleTimeString()
- Correct: "00:00:00"
- Incorrect: "23:00:00"
With the mark "Incorrect" we use Chrome, Firefox, Safari, etc. as a reference implementation, assuming they have implemented the specification correctly.
It looks like that constructing a Date object with numeric parameters does not take daylight saving into account correctly. In one flow it is assuming "CEST" +02:00 Central-European Summer-Time and in the other flow it converts to "CET" +01:00 Central-European Time, substracting 1 hour of the clock, getting the date of the day before.
Can anyone explain to us why Internet Explorer 11 has this behavior on these specific set of workstations? Is there any (Microsoft) documentation that explains this?