Javascript date, is this my error or did I find a bug?

后端 未结 3 1512
旧时难觅i
旧时难觅i 2021-01-18 03:55

I have a section of simple Javascript in my application that has a link \"Add Day\", which adds 1 day to a date. It always works perfectly, except when the date gets to be

3条回答
  •  囚心锁ツ
    2021-01-18 04:07

    The problem is that you're adding the 24 hours to the date to add one day; Daylight Savings Time has thwarted you because 24 hours after 00:00 on November 7th will be 23:00 (for the second time) on November 7th.

提交回复
热议问题