Wrong minutes and seconds in a JavaScript date before year 1925 [duplicate] Wrong minutes and seconds in a JavaScript date before year 1925 [duplicate] google-chrome google-chrome

Wrong minutes and seconds in a JavaScript date before year 1925 [duplicate]


Prior to 1883 Time Zones were not standardized. If you check every year you'll notice that 1883 is "broken" with the additional minutes and 1884 is "fine". Chrome handles this transition very well - you'll notice the "problem" doesn't exist in Firefox.

new Date("1883-01-01T00:00:00+00:00")Sun Dec 31 1882 16:07:02 GMT-0752 (Pacific Standard Time)new Date("1884-01-01T00:00:00+00:00")Mon Dec 31 1883 16:00:00 GMT-0800 (Pacific Standard Time)

In fact, you can track this down to November 18th, 1883.

new Date("1883-11-18T00:00:00+00:00")Sat Nov 17 1883 16:07:02 GMT-0752 (Pacific Standard Time)new Date("1883-11-19T00:00:00+00:00")Sun Nov 18 1883 16:00:00 GMT-0800 (Pacific Standard Time)

Chrome tries very hard to match time, even going so far as to calculate the suspended DST of Ramadan in Egypt in 2010.

Read more here: https://www.huffingtonpost.com/quora/how-when-and-why-were-tim_b_5838042.html