I have api which will give a date and timezone
{"time":"2021-01-01 10:10:10","zone":"America/Denver"}
we are not sure which timezone they are providing
How to 1)convert time to local timezone 2)convert time to another timezone
i tried
date.toLocaleString("en-US", {timeZone: "any timezone"});
but this will consider date as your local timezone only