How to convert IST datetime to specified datetime in React typescript

Viewed 38

I want to convert a date string such as 2022-06-27T09:00:00 into PST timezone. (GMT-08:00) Pacific Time (US & Canada)

I'm first converting it to UTC:

const dt = new Date("2022-06-27T09:00:00");
const utcdt = new Date(dt).toUTCString();

How to convert it to a specified timezone?

0 Answers
Related