0

For some reason we still have to support that old browser version on Ubuntu 10.04

There are several hosts where Mar 26, 1994 is constructed instead of Mar 27, 1994. Yes, exactly that date, other dates haven't been reported yet.

enter image description here

My first idea was that that is a bug of the given Chromium version.

But, there are also some docker containers with exactly the same browser version, and on some of them the problem is reprodused whereas it is not reprodused on another ones.

enter image description here

UPDATE

More tests (as requested)

enter image description here

humkins
  • 9,635
  • 11
  • 57
  • 75
  • Did you try `new Date(1994, 2, 26)`? – Bergi Oct 03 '18 at 20:49
  • Possible duplicate of [Why does the month argument range from 0 to 11 in JavaScript's Date constructor?](https://stackoverflow.com/questions/2552483/why-does-the-month-argument-range-from-0-to-11-in-javascripts-date-constructor) – Dan O Oct 03 '18 at 20:49
  • 5
    As you can see, at that date the timezone changed to summer time. It seems to be merely a timezone issue. Make sure your code always works with UTC. – Bergi Oct 03 '18 at 20:50
  • 3
    @DanO No, that's not the question. – Bergi Oct 03 '18 at 20:50
  • Probably a duplicate of [*Why does Date.parse give incorrect results?*](https://stackoverflow.com/questions/2587345/why-does-date-parse-give-incorrect-results) When using non–standard strings, parsing is implementation dependent, even between versions of implementations. Whatever the reason for the issue, the fix is the same: don't use the built-in parser. – RobG Oct 03 '18 at 23:58
  • @Bergi—DST changes are usually made around 02:00, though some places change at midnight, so maybe it depends on timezone? I can't see the images. – RobG Oct 04 '18 at 00:01
  • @Dan O Can you please read the question carefully? Because I don't know what I have to modify in it in order to unmark it as a duplicate. – humkins Oct 04 '18 at 04:15
  • @Bergi please see one more screenshot attached – humkins Oct 04 '18 at 12:28
  • 1
    OK, that's weird - in only that night, entering the local time seems to already take the DST into account (while not in effect until 2:00) but then it is displayed using normal time. As I said, just always use UTC: `new Date(Date.UTC(1994, 2, 26)).toUTCString()` – Bergi Oct 04 '18 at 15:10

0 Answers0