I'm currently working with Moment.js which is used to convert one time zone to another. I read the document and when I tried it doesn't give any suitable result.
Right now, I'm doing the following for converting a local time to some other time zone (for eg. America/Toronto).
var dt = moment();
alert(moment.utc(dt.local()).tz("America/Toronto").format());
At the second line of code, I converted the local time to utc and then the timezone name, to which the local time zone to be converted. but the time zone alerted is the UTC time of local time. I don't know what I have done wrong.
Any help would be appreciable.