Advertisement
728x90
You can use the toLocaleString() method to convert dates in one timezone to another. For example, let's convert current date to British English timezone as below,
javascript
1console.log(new Date().toLocaleString("en-GB", { timeZone: "UTC" })); //29/06/2019, 09:56:00Advertisement
Responsive Ad
🎯 Practice NowRelated Challenge
JavaScript Coding Exercise 1
Test your knowledge with this interactive coding challenge.
Start CodingAdvertisement
728x90
172of476