Reputation: 4412
I have got this:
startDate = new Date();
startDate = new Date(Date.parse('2014-10-20'));
finishDate = new Date();
finishDate = new Date(Date.parse('2014-11-21'));
Mon Oct 20 2014 01:00:00 GMT+0100 (Hora de Verão de GMT)
;Fri Nov 21 2014 00:00:00 GMT+0000 (Hora padrão de GMT)
;You can see the GMT+0100 in the startDate and not in the finishDate, possibly because after 26 October the winter time is on.
I want to get those dates without regard to the timezone, winter or summer time.
Upvotes: 1
Views: 631
Reputation: 33399
You could use Date#toUTCString()
. This will return a string with the date in UTC timezone, which naturally will ignore daylight savings time.
Upvotes: 1