Let the following snippet:
var dateJS = new Date("1950-09-09T23:00:00.000Z");
var dateMoment = moment("1950-09-09T23:00:00.000Z");
console.log("Javascript Epoch Time:", dateJS.valueOf());
console.log("Moment Epoch Time:", dateMoment.valueOf());
console.log("Is DST?", dateMoment.isDST());
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.23.0/moment.min.js"></script>
If you run it with some Firefox versions (such as Firefox 61.0.1) or with Microsoft Edge you get Is DST? true
. Instead, if you run it with some other Firefox versions (such as 64.0) or any Chrome you get Is DST? false
.
What could be the reason?
NEW SNIPPET:
var mar1947 = moment("1947-03-20T00:00:00.000Z");
var sep1947 = moment("1947-09-10T00:00:00.000Z");
var mar1950 = moment("1950-03-20T00:00:00.000Z");
var sep1950 = moment("1950-09-10T00:00:00.000Z");
var mar2019 = moment("2019-03-20T00:00:00.000Z");
var sep2019 = moment("2019-09-10T00:00:00.000Z");
console.log("March 1947: Epoch Time / DST:", mar1947.valueOf(), mar1947.isDST());
console.log("September 1947: Epoch Time / DST:", sep1947.valueOf(), sep1947.isDST());
console.log("March 1950: Epoch Time / DST:", mar1950.valueOf(), mar1950.isDST());
console.log("September 1950: Epoch Time / DST:", sep1950.valueOf(), sep1950.isDST());
console.log("March 2019: Epoch Time / DST:", mar2019.valueOf(), mar2019.isDST());
console.log("September 2019: Epoch Time / DST:", sep2019.valueOf(), sep2019.isDST());
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.23.0/moment.min.js"></script>
Please run the snippet with Chrome and then with Firefox 61.0.1 or Microsoft Edge and see if the result is the same.
It will not.
(Full playground here https://codepen.io/anon/pen/yZMqrV)