I want to convert 2022-01-15T12:22:24.0078237
into Sat Jan 15 2022 23:24:18 GMT+1100
. The answers in Convert UTC date time to local date time say that the Date
constructor should convert from UTC to local date, but clearly this isn't working here. What can I do to convert the UTC date into the local client date?
new Date("2022-01-15T12:22:24.0078237")
> Sat Jan 15 2022 12:22:24 GMT+1100 (Australian Eastern Daylight Time)
new Date()
> Sat Jan 15 2022 23:24:18 GMT+1100 (Australian Eastern Daylight Time)