Ayus
Ayus

Reputation: 59

UTC to EST Moment.js

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

Answers (1)

Adam Hopkinson
Adam Hopkinson

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

Related Questions