2

I have an URL like this:

http://localhost/TestWeb/TestPage?dateFrom=2013-10-10T22:00:00.000Z&dateTo=2013-10-17T22:00:00.000Z

And action like this:

public ActionResult TestPage(DateTime dateFrom, DateTime dateTo)
{
    //do something
}

As you can se from the URL, I am passing DateTime as UTC, but something (ModelBinder?) is converting that DateTime to a local DateTime.

Is this the default behavior? Can I always assume that DateTime objects will be converted to local time?

xx77aBs
  • 4,678
  • 9
  • 53
  • 77
  • The ModelBinder will parse the date based on your server / os configuration – Fals Oct 17 '13 at 12:31
  • I think this will help.http://stackoverflow.com/questions/9756120/utc-timestamp-in-javascript – Jeff Oct 17 '13 at 13:08

0 Answers0