These are not equal. It makes no sense.
moment('2018-01-01').tz('UTC').format('MM DD, YYYY') // 31 12, 2017
moment.tz('2018-01-01', 'UTC').format('MM DD, YYYY') // 01 01, 2018
Firefox Quantum 59.0.2 on Windows 10
@Ohar
It works according to the documentation https://momentjs.com/timezone/docs/#/using-timezones/
moment.tz(..., String) is used to create a moment with a time zone,
moment().tz(String) is used to change the time zone on an existing moment
But I agree that it's very confusing - looks similar, but works in a different way.
They have the same result for me..
Most helpful comment
@Ohar
It works according to the documentation https://momentjs.com/timezone/docs/#/using-timezones/
But I agree that it's very confusing - looks similar, but works in a different way.