Unless you specify a timezone offset, parsing a string will create a date in the current timezone.
moment("2010-10-20 4:30", "YYYY-MM-DD HH:mm"); // parsed as 4:30 local time
moment("2010-10-20 4:30 +0000", "YYYY-MM-DD HH:mm Z"); // parsed as 4:30 UTC
解决方法:
程序只需要支持一个时区的用户的话,可以把服务器的时区改成你的时区。
多时区的话,要记录用户所在时区,时间显示时加时区offset。