I am getting time from server as "19:30" but it needs to be converted to "Pacific/Easter time zone.
I have tried things like
let t = "19:30:00";
let utc = moment.utc(t);
let z = moment(utc).utcOffset(-300).format('HH:mm');
But I am going wrong somewhere.
I have seen in my dev app version that it is being converted to 14:30 which is like -5:00 hours.
So, how do I get similar result for this?
Here's something else that I tried
let t = "19:30:00";
let tt = moment.tz(t, "UTC");
let nt = tt.clone().tz("Pacific/Easter");
and I am getting nt as "19:30:00" also. so , it's not converting at all
this is the one that seems to be working. but it's not showing the correct result
let t = "19:30:00";
let utc = moment.utc(t, 'HH:mm:ss');
let z = utc.tz('Pacific/Easter').format('HH:mm');
console.log(z);
it should show the result as 19:30 -5 hours which should be 14:30, but it shows the result as 13:30. so, anyone knows why this is happening??