Tell HN: The day that lasted 25 hours
http://jsfiddle.net/mauron85/aujyeacc/
http://jsfiddle.net/mauron85/aujyeacc/
It's the test spec that's wrong. On the day DST ends, the hour from 1:00 to 1:59 is repeated twice, which gives you 25 hours. When DST begins, that day is only 23 hours long. MomentJS isn't doing anything strange here.
But both moment('2015-25-10 2:00', 'YYYY-MM-DD HH:mm').isDSTShifted() moment('2015-25-10 3:00', 'YYYY-MM-DD HH:mm').isDSTShifted()
return false
Here's a fiddle showing isDSTShifted() working with the US DST start (I don't know what date to use for your location):
I think you're looking for isDST()?
But: moment('2015-25-10 2:00', 'YYYY-MM-DD HH:mm').isDST() moment('2015-25-10 3:00', 'YYYY-MM-DD HH:mm').isDST()
return false.
That's not correct in my TZ. Confused.