From a rest application I get different times in UTC.
A few examples 2999-01-30T23:00:00.000Z or 1699-12-30T23:00:00.000Z.
I convert it to Time on the front end, using new Date(date) in JavaScript.
The problem is then in the resulting format.
new Date("2999-01-30T23:00:00.000Z") results in Thu Jan 31 2999 00:00:00 GMT+0100, as expected.
But new Date("1699-12-30T23:00:00.000Z") results in Wed Dec 30 1699 23:57:44 GMT+0057.
Why does it suddenly give me this output? Why is there this odd time shift?
I wonder what the problem is, whether anything exists to solve this? I could not find anything.