title: Passing DateTimeOffset as WebAPI query string
body: <p>I've got a WebAPI action that looks like so:</p>
  
  <pre><code>[Route("api/values/{id}")]
  public async Task&lt;HttpResponseMessage&gt; Delete(string id, DateTimeOffset date) {
      //do stuff
  }
  </code></pre>
  
  <p>But when I invoke this from a <code>HttpClient</code> instance, making a URL like:</p>
  
  <pre><code>string.Format("http://localhost:1234/api/values/1?date={0}", System.Net.WebUtility.UrlEncode(DateTimeOffset.Now.ToString()));
  // -&gt; "http://localhost:1234/api/values/1?date=17%2F02%2F2015+7%3A18%3A39+AM+%2B11%3A00"
  </code></pre>
  
  <p>I get a <code>400</code> response back saying that the non-nullable parameter <code>date</code> does not exist.</p>
  
  <p>I've also tried adding the <code>[FromUri]</code> attribute to the parameter but it still doesn't map through. If I change it to be <code>DateTimeOffset?</code> I can see it is left as null and looking at <code>Request.RequestUri.Query</code> the value is there, just not mapped.</p>
  
  <p>Finally I tried not doing a <code>WebUtility.UrlEncode</code> and it made no different.</p>