Is the Javascript date object always one day off?

后端 未结 23 2648
既然无缘
既然无缘 2020-11-22 01:49

In my Java Script app I have the date stored in a format like so:

2011-09-24

Now when I try using the above value to create a new Date obje

23条回答
  •  孤街浪徒
    2020-11-22 02:29

    Your log outputs GMT so you want to specify your timezone:

    var doo = new Date("2011-09-24 EST");
    

提交回复
热议问题