Thanks to Ian, this ended up being the solution.
moment.unix(dateTime).tz(timezone).format(format);
I was trying moment.utc()
instead of moment.unix()
.
The strange results came from moment.utc(datetime, format)
expecting datetime
to match format
. However, it's important to note that moment.utc(datetime)
still returns 1970 year result so it still wouldn't have returned the desired result even without the format.