title: Calculate the UTC offset given a TimeZone string in JavaScript
body: <p>Using the standard JS library (ECMA5), <em>without using momentjs or external libs</em>, how do you calculate the UTC offset given a TimeZone string such as "Europe/Rome" or "America/Los_Angeles"?</p>
  
  <p>UTC Offsets may depend on whether it is DST or not, so it would make sense if the solution required converting the local client date to the specified Timezone String. The goal is just to know the offset from UTC.</p>
  
  <pre><code>function getUtcOffset(timezone) {
    // return int value. 
    // &gt; 0 if +GMT 
    // &lt; 0 if -GMT.
  }
  </code></pre>