title: Parsing RFC-3339 / ISO-8601 date-time string in Go
body: <p>I tried parsing the date string <code>&quot;2014-09-12T11:45:26.371Z&quot;</code> in Go. This time format is defined as:</p>
  <ul>
  <li><a href="https://datatracker.ietf.org/doc/html/rfc3339#section-5.6" rel="noreferrer">RFC-3339 date-time</a></li>
  <li><a href="https://en.wikipedia.org/wiki/ISO_8601" rel="noreferrer">ISO-8601 date-time</a></li>
  </ul>
  <p><strong>Code</strong></p>
  <pre><code>layout := &quot;2014-09-12T11:45:26.371Z&quot;
  str := &quot;2014-11-12T11:45:26.371Z&quot;
  t, err := time.Parse(layout , str)
  </code></pre>
  <p>I got this error:</p>
  <blockquote>
  <p>parsing time &quot;2014-11-12T11:47:39.489Z&quot;: month out of range</p>
  </blockquote>
  <p>How can I parse this date string?</p>