0
Try using toLocaleString
method and specify the timeZone
:
x = JSON.parse(`{"date":"2021-05-11 13:02:01.273000","timezone_type":3,"timezone":"UTC"}`);
new Date(x.date).toLocaleString("en-US", {timeZone: x.timezone})
Source:stackexchange.com
0
Try using toLocaleString
method and specify the timeZone
:
x = JSON.parse(`{"date":"2021-05-11 13:02:01.273000","timezone_type":3,"timezone":"UTC"}`);
new Date(x.date).toLocaleString("en-US", {timeZone: x.timezone})