title: Is getTimezoneOffset() stable during daylight saving transition?
body: <p>I have date time below conversion logic in Javascript which is converting the UTC time into passed timezone's local time. I am wondering this logic will work fine during Daylight transition? If not what is the remedy for that? I can't use any third party library. I have to use pure javascript or Angular JS.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> function myTime()
          {
          
          var d1= document.getElementById("txtDate").value;
          var zOffset = document.getElementById("txtOffset").value;
          console.log("Date1",d1);
          
          var d2 = new Date(d1.replace(/ /g,'T'));
          
          var d3= d2.getTime()+(d2.getTimezoneOffset()*60000);
          
          console.log("Date2",d2);
          console.log("Date3",d3);
          var d4 = new Date(d3 + (3600000 * zOffset));
          
          console.log("Date3",d3);
          console.log("Date 4",d4);
          
          var d5 = d4.toLocaleTimeString();
          console.log("Date 5",d5);
          
          //d6 =d5.match(/(\d+)(?=:\d+:\d+)|([A-Z]+)(?=$)/g).join(" ");
          
          //console.log("Date6",d6)
          
          document.getElementById("hourValue").innerHTML = d5;
          }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;h1&gt;
  TimeZone
  &lt;/h1&gt;
  &lt;h2 id="hourValue"&gt;
  
  &lt;/h2&gt;
  &lt;table&gt;
  &lt;tr&gt;
    &lt;td&gt;Date Time&lt;/td&gt;
    &lt;td&gt;&lt;input type="text" id="txtDate" value="2016-04-10 09:00:00.0" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;TimeZone&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;&lt;input type="text" id="txtOffset" value="-5.00" /&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;&lt;input type="submit" id="btnSubmit" value="Convert" onClick="myTime()" /&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>