0

In javascript Date.parse('2015-04-02') returns 1427932800000 which is the same result as Date.parse('2015-04-02 03:00:00'), what can explain this behaviour?

1 Answers1

0

The Date depends on your local timezone. but the returned number is un UTC. if you want to convert you can do (I think) :

var date = new Date('2015-04-02 03:00:00')
date.setMinutes(-date.getTimezoneOffset())
DARK_DUCK
  • 1,727
  • 2
  • 12
  • 22