title: How do I get ISO8601 string with time offset in JavaScript?
body: <p>I want to get a time string in </p>
  
  <blockquote>
    <p>"%Y%m-%dT%H:%M:%S%z"</p>
  </blockquote>
  
  <p>format in chrome using JavaScript. But chrome just returns  'Z' character like below.</p>
  
  <pre><code>new Date().toISOString()
  -&gt;"2015-07-23T07:41:36.617Z"
  </code></pre>
  
  <p>Although I know an upper result is valid, my project also includes a c++ application. So I want to unify date format like below. </p>
  
  <pre><code>2015-07-23T16:41:36.617+09:00
  </code></pre>
  
  <p>So are there any good ways to realize my date format?</p>
  
  <p>ES6 specification</p>
  
  <p><a href="http://www.ecma-international.org/ecma-262/6.0/#sec-date-time-string-format" rel="nofollow">http://www.ecma-international.org/ecma-262/6.0/#sec-date-time-string-format</a></p>