What is the difference between toGMTstring() and toUTCstring()?

前端 未结 4 1282
醉梦人生
醉梦人生 2021-02-14 06:53

I am saving data in MongoDB server from Node.js application (using Mongoose).

Consider following code:

var mongoose = require(\'mongoose\');
var Schema =         


        
4条回答
  •  长情又很酷
    2021-02-14 07:12

    for ISO use toISOString()

    var today = new Date();
    var ISOstring = today.toISOString();
    // 2020-08-03T23:59:58.123Z
    

提交回复
热议问题