Yesterday I posted this question about MongoDB UTC record timestamp issues when using MomentJS
:
MomentJS not converting date correctly
Blakes Seven's answer solved the issue locally, but when I deployed to AWS EC2, the problem reoccurred. Here are the steps I took to understand the issue:
zip
from S3 bucket. So the code fix is definitely live. US East (N. Virginia)
October 21, 2015 at 4:51:31 PM UTC-4 (2684 hours)
: I can't find the actual time zone config of my EC2, but this tells me it's UTC. So my questions are:
UTC
time I have a simular issue. Everything was going fine with moment.locale('fr')
but wen wrong on AWS EBS/EC2. I solved it by using moment-timezone
and force to 'Europe/Paris': moment.tz('Europe/Paris')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.