title: How to convert UTC to local date in JavaScript
body: <p>I want to convert <code>2022-01-15T12:22:24.0078237</code> into <code>Sat Jan 15 2022 23:24:18 GMT+1100</code>. The answers in <a href="https://stackoverflow.com/questions/6525538/convert-utc-date-time-to-local-date-time">Convert UTC date time to local date time</a> say that the <code>Date</code> 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?</p>
  <pre><code>new Date(&quot;2022-01-15T12:22:24.0078237&quot;)
  &gt; Sat Jan 15 2022 12:22:24 GMT+1100 (Australian Eastern Daylight Time)
  new Date()
  &gt; Sat Jan 15 2022 23:24:18 GMT+1100 (Australian Eastern Daylight Time)
  </code></pre>