Why converting new.Date() .toISOString() changes the time?

前端 未结 3 1853
-上瘾入骨i
-上瘾入骨i 2021-02-19 00:04

I\'m inserting a date in a database in two different format.

this is inserting as Datetime

    var mydate;
    mydate = new Date();
            


        
3条回答
  •  一个人的身影
    2021-02-19 00:23

    ISO time is time zone free. You'll notice with b you have time zone GMT-04:00 if you add those four hours to the 16 hours in the Date, you get 20

提交回复
热议问题