javascript
var get_tz = function(country_code){
var tz = new Date(currentUtcTime.toLocaleString('en-US', { timeZone: country_code}));
return (tz.getHours()<10?"0"+tz.getHours():tz.getHours())+":"+(tz.getMinutes()<10?"0"+tz.getMinutes():tz.getMinutes());
}
MDN
suggests the above method will be supported by most browser except mobile phone. I tried to run the page on my iPhone, and it worked as expected. Maybe I have the latest OS.
I have my doubts and wonder if there is a better way or new way to approach timezone problem.
Read
"Date.prototype.toLocaleString" from MDN
How to check if the DST (Daylight Saving Time) is in effect and if it is what's the offset?