How come my javascript (node.js) is giving me the incorrect timestamp?

前端 未结 4 1565
攒了一身酷
攒了一身酷 2021-01-12 02:39

I typed \"date\" in console...and I get Tue Sep 20 01:01:49 PDT 2011 ...which is correct.

But then I do this in node.js, and I get the wrong time.

4条回答
  •  离开以前
    2021-01-12 03:29

    Note you can avoid this confusion by using a node.js package like timezonecomplete or timezone-js which have an interface that is much less error-prone for date and time manipulation.

提交回复
热议问题