title: Strictly enforce ISO8601 date format in WebAPI 2
body: <p><strong>Preamble</strong></p>
  
  <p>By default the JSON serializer supports the ISO DateTime Standard by the means of the <code>IsoDateTimeConverter</code></p>
  
  <p>With some additional customization we can force that all Datetimes are in UTC (<a href="http://www.asp.net/web-api/overview/formats-and-model-binding/json-and-xml-serialization" rel="nofollow noreferrer">http://www.asp.net/web-api/overview/formats-and-model-binding/json-and-xml-serialization</a>)</p>
  
  <pre><code>jsonFormatter.SerializerSettings.DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc
  </code></pre>
  
  <p>This again works as expected with <code>1972-09-18T02:29:12.264513Z</code> and <code>1972-09-18T04:29:12.264513+02:00</code> both equating to <code>1972-09-18 02:29:12 AM</code> after serialization.</p>
  
  <p><strong>Problem</strong></p>
  
  <p>Unfortunately, however, leaving off the time-zone offset suffix also successfully serializes. So <code>1972-09-18T04:29:12.264513</code> equates to <code>1972-09-18 04:29:12 AM</code> UTC.</p>
  
  <p>The problem here is that we've made the assumption that the consumer knows about date formats and understands (based on our documentation) that dates are always assumed as UTC.</p>
  
  <p><strong>The Question</strong></p>
  
  <p>Is there a way to force the serialization to fail if the time-zone offset suffix is missing so that we are not making any assumptions?</p>