Reputation: 5271
I have an ISO date in javascript like this 2017-04-29T00:00.000Z
which I expect to be parsed as Date with time 12:00:00 AM in C# when I received the value in my web api2 method.
However, this value 2017-04-29T00:00.000Z
is converted to my local time zone
[HttpPost]
public IHttpActionResult MyMethod(DateTime date)
{...}
This is my url send with Jquery .ajax "/api/Employee?date=" + date
How can I avoid my date to be transformed to current time zone when received? I am getting this value 2017-04-28 10:00 AM
in C# when I send this value from $.ajax 2017-04-29T00:00.000Z
Upvotes: 1
Views: 480