title: Convert UTC Epoch to local date
body: <p>I have been fighting with this for a bit now. I’m trying to convert epoch to a date object. The epoch is sent to me in UTC. Whenever you pass <code>new Date()</code> an epoch, it assumes it’s local epoch. I tried creating a UTC object, then using <code>setTime()</code> to adjust it to the proper epoch, but the only method that seems useful is <code>toUTCString()</code> and strings don’t help me. If I pass that string into a new date, it should notice that it’s UTC, but it doesn’t.</p>
  
  <pre><code>new Date( new Date().toUTCString() ).toLocaleString()
  </code></pre>
  
  <p>My next attempt was to try to get the difference between local current epoch and UTC current epoch, but I wasn’t able to get that either.</p>
  
  <pre><code>new Date( new Date().toUTCString() ).getTime() - new Date().getTime()
  </code></pre>
  
  <p>It’s only giving me very small differences, under 1000, which is in milliseconds.</p>
  
  <p>Any suggestions?</p>