title: How to determine if a past date is DST using javascript? I know the date and time and timezone (which is not localtime)
body: <p>Timestamp is &quot;2021-08-13 05:30:00&quot; and I know that it is US Central Time. What I don't know is if it is DST or not. So without knowing that I cannot convert to UTC correctly. How would I use javascript to get UTC.</p>
  <p>I know date and time and timezone (Central Time specifically), but I do not know if it is DST or not and I do not know it's timezoneoffet from zulu.</p>
  <pre><code>console.log(someFunction(&quot;2022-06-10 15:16:17&quot;, &quot;US/Central Time Zone&quot;));
  &gt; 2022-06-10 15:16:17 -6 // wrong
  &gt; 2022-06-10 15:16:17 -5 // correct because DST
  </code></pre>
  <ul>
  <li>Seems with javascript not natively understanding timezones, timezone names, and DST rules, there is no way to do this without external data and or functions. Which is not a big deal unless you have to process hundreds or thousands of these requests on the client side.</li>
  </ul>
  <p>So, I'm looking at trying to get a offset reference once and applying that to all the client side needs. Or passing the clients timezone offset to the server and let the server figure it all out.</p>