Is the Javascript date object always one day off?

后端 未结 23 2802
既然无缘
既然无缘 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:15

    nevermind, didn't notice the GMT -0400, wich causes the date to be yesterday

    You could try to set a default "time" to be 12:00:00

提交回复
热议问题