Skip to content Skip to sidebar Skip to footer

Parsing Historical Utc Date Times Gives An Odd Time Zone Shift

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(dat

Solution 1:

I'm guessing with a date from 1699, you are back in history where timezones were different. For example here in Denmark we switched to CET in 1894, so I get:

new Date("1893-12-31T00:00:00.000Z");
// Sun Dec 31 1893 00:50:20 GMT+0050 (Central European Standard Time)
new Date("1894-01-01T00:00:00.000Z");
// Mon Jan 01 1894 01:00:00 GMT+0100 (Central European Standard Time)

Post a Comment for "Parsing Historical Utc Date Times Gives An Odd Time Zone Shift"