Dates before 1921-05-01 that have timezones behave strangely in JavaScript. The timezone is converted to GMT+0139 (I am in GMT+0200).
Examples:
> new Date("1921-05-01T13:37:00+0200") // works on 1921-05-01 and later
Date Sun May 01 1921 13:37:00 GMT+0200 (Eastern European Standard Time)
> new Date("1921-04-30T13:37:00+0200")
Date Sat Apr 30 1921 13:16:49 GMT+0139 (Eastern European Standard Time)
> new Date("1921-04-30T16:20:00+0000")
Date Sat Apr 30 1921 17:59:49 GMT+0139 (Eastern European Standard Time)
> new Date("1234-03-03T16:20:00+0000")
Date Fri Mar 03 1234 17:59:49 GMT+0139 (Eastern European Standard Time)
It works properly without a timezone, but the it is still converted to GMT+0139:
> new Date("1234-03-03T16:20:00")
Date Fri Mar 03 1234 16:20:00 GMT+0139 (Eastern European Standard Time)
Any idea why this might be and how to avoid it?
Tested with Firefox 90 and Chromium 91 on Linux and Windows.