MomentJS set timezone without changing time

At the time of writing this (Moment 2.22), you could go from local to UTC with someLocalMomentVariable.utc(true) then back from UTC to local with someUtcMomentVariable.local(true).


If you are using moment.js use utcOffset with true as second parameter.

date2 = moment(date1).utcOffset('+0400', true)

Or If you are using moment-timezone, you can use tz function on moment object with second parameter as true.

date1 = moment(date1).tz('Asia/Kolkata', true)