title: How to set datetime Kind UTC for webapi url parameters
body: <p>I have the following code:</p>
  
  <pre><code>[HttpGet]
  [Route("{startDateUtc:datetime}/{endDateUtc:datetime}/{pageNumber?}", Name = "MyRoute")]
  [ResponseType(typeof(List&lt;string&gt;))]
  public IHttpActionResult GetData(DateTime? startDateUtc, DateTime? endDateUtc, int pageNumber = 1)
  {
      HandleData(startDateUtc.Value, endDateUtc.Value, pageNumber);
      return this.Ok();
  }
  </code></pre>
  
  <p>I try to use the following url: <a href="http://localhost:5555/MyRoute/2014-09-17T00:00:00Z/2014-09-18T00:00:00Z/1" rel="nofollow noreferrer">http://localhost:5555/MyRoute/2014-09-17T00:00:00Z/2014-09-18T00:00:00Z/1</a>
  The problem is that <code>startDateUtc.Value</code> and <code>endDateUtc.Value</code> have Kind <code>property = DateTimeKind.Local</code> .
  I want to have dates in <code>DateTimeKind.Utc</code> Kind.</p>
  
  <p>There are some solutions for example : apply <code>.ToUniversalTime()</code> function OR implement filter which will handle datetime params and call <code>.ToUniversalTime()</code>. But these are not good because I need to put these through all projects.</p>
  
  <p>Is it possible to config it somehow in <code>Global.asax</code> OR implement some parser of datetime URL parameters which will based on exiting and just call for exmaple <code>.ToUniversalTime()</code> function?</p>