I have a string in ISO format 2020-03-11T21:00:00Z
. I need help with converting this string to a Date object but keep it as UTC timezone. The expected output is Wed Mar 11 2020 21:00:00 GMT+0000 (UTC)
.
I've tried moment.utc('2020-03-11T21:00:00Z').toDate()
but the output was in my local timezone: Thu Mar 12 2020 05:00:00 GMT+0800 (Malaysia Time)
.
Thanks