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

前端 未结 4 1407
醉梦人生
醉梦人生 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:34

    From what I can see they are the same. And the documentation at MDN already states that toGMTString has been deprecated in favor of toUTCString:

    toGMTString() is deprecated and should no longer be used. It remains implemented only for backward compatibility; please use toUTCString() instead.

提交回复
热议问题