How to handle dates in different timezones?

What is the correct way to handle dates between a CC task in the UK and the app in SA?

You can specify the timezone you would like your task to use by doing the following:

new Date().toLocaleString("en-US", {timeZone: "Europe/London"})

which will return the time in London. Or:

new Date().toLocaleString("en-US", {timeZone: "Africa/Johannesburg"})

for the time in South Africa

1 Like