I am trying to convert current JavaScript time into different time zones based on few conditions.
Times zones to which I need to convert are "PT", "PST" etc.
So, in order to do that I need to convert the current date into "PT" or other time zones conditionally. Most of the answers on stack-overflow direct to use "getTimezoneOffset()". But I didn't get any luck.
var now = new Date();
var offset = new Date().getTimezoneOffset();
How can I get offset of "PST", "PT" or any other time zones?
var convertedTime = now.toTimeString().split(' ')[0];