I want to convert given Date time to local Date time, when input Date time and timeZone is given separately as below
How to convert above timezone to local Date time without using moment library ?
If you are able to use moment, this becomes pretty straightforward. Check this working example.
let date = "20220120080000";
const format = "YYYYMMDDHHmmss";
let tz = "Australia/Perth";
const remoteTime = moment.tz(date, format, tz);
const localTime = moment(remoteTime).local();