Reputation: 59
While converting this date (only date, no time required) 2018-03-31T00:00:00.000Z
to EST, I keep getting 2018-03-30
.
What am I doing wrong with Moment.js? Can't this be converted to EST with 2018-03-31
?
Upvotes: 0
Views: 297
Reputation: 28795
EST is 4 hours behind UTC, so midnight (00:00:00) on the 31st in UTC is 8pm (20:00:00) on the 30th in EST.
Moment.js is doing exactly as it should.
Upvotes: 3