I want to change JavaScript Object Time zone. I am able to access time of the required timezone but date objects still shows my local timezone with it.
new Date()
output //Thu Nov 18 2021 16:30:23 GMT+0500 (Pakistan Standard Time)
new Date().toLocaleString("en-US", {timeZone: "America/Los_Angeles"})
output //'11/18/2021, 3:30:40 AM'
new Date().toLocaleString("en-US", {timeZone: "America/Los_Angeles", timeZoneName: "short"})
output //'11/18/2021, 3:30:54 AM PST'
new Date(new Date().toLocaleString("en-US", {timeZone: "America/Los_Angeles", timeZoneName: "short"}))
output //Thu Nov 18 2021 16:37:35 GMT+0500 (Pakistan Standard Time)
