title: Update formatted date string to UTC value
body: <p>Users are able to submit only the date part of a date stamp e.g. <code>2020-12-01</code>, assuming that the time will be <code>00:00:00</code></p>
  <p>So, if I have the above value, I want to update the time to its UTC value. So if I am in the EST timezone, I want to convert <code>2020-12-01</code> to <code>2020-12-01 05:00:00</code> to account for the five hour offset.</p>
  <p>Can I do this with <code>date-fns-tz</code>?</p>
  <pre><code>const { zonedTimeToUtc, format } = require(&quot;date-fns-tz&quot;);
  
  const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
  
  const utcDate = zonedTimeToUtc(new Date(&quot;2020-12-01&quot;), tz);
  
  document.getElementById(&quot;app&quot;).innerHTML = `${format(
    utcDate,
    &quot;yyyy-MM-dd HH:mm:ss&quot;
  )}
  `;
  </code></pre>
  <p>The above yields <code>2020-11-30 19:00:00</code>, which is moving the time 5 hours in the wrong direction.</p>
  <p><a href="https://codesandbox.io/s/happy-hoover-dn417?file=/src/index.js:23-301" rel="nofollow noreferrer">https://codesandbox.io/s/happy-hoover-dn417?file=/src/index.js:23-301</a></p>