title: How to get the timezone offset from a string in Javascript
body: <p>I receive a date in a string format with an offset, but javascript is converting it to local device time</p>
  
  <pre><code>var d = new Date("2012-11-13T11:34:58-05:00");
  debug.log(d);
  </code></pre>
  
  <p>returns <strong>Tue Nov 13 2012 17:34:58 GMT+0100 (CET)</strong> </p>
  
  <pre><code>var offset = d.getTimezoneOffset();
  debug.log(offset);
  </code></pre>
  
  <p>returns <strong>-60</strong> (my device is utc +1h)</p>
  
  <p>I just want to have the time with the offset, or having the timezone offset mentioned in the string (-5h in the example)</p>