MomentJs Format One Day Behind
问题 I have seen a question that is similar to mine (Moment.js sets dates to 1 day behind) but I can't seem to apply it. Essentially, my date gets parsed like this: var date = moment("2019-05-27T00:00:00Z"); // date is the 27th When I format it to get the day, expecting the 27th, I instead receive the 26th! date.format("DD") Does anyone know why this might be happening and how to correct it? http://jsfiddle.net/rmdxj26e/ 回答1: You must use moment.utc(), the Moment documentation says: By default,