如果现在位于美国的VPS显示时间"Mon Sep 25 20:23:56 UTC 2017",我在印度的本地机器显示时间"Mon Sep 25 20:25:36 UTC+5:30 2017“(VPS提前2分钟)。
我的问题是,当我将date保存到mongodb remote时,它会另存为"createdAt" : ISODate("2017-09-25T20:23:56.461Z"),而当我在本地机器上看到网站时,时间显示为Tue Sep 26 01:33 UTC 2017。我真的不明白出了什么问题??
为什么在我的本地机器上使用UTC+5:30?为什么VPS服务器时间与印度标准时间相同?
发布于 2017-09-25 23:50:38
使用date命令检查系统时间。
所有服务器应与NTP服务器同步时间,以避免此类问题。
yum install ntp
chkconfig ntpd on
ntpdate pool.ntp.org // You can use ur own NTP server
service ntpd starthttps://stackoverflow.com/questions/46408476
复制相似问题