0

I have date in javascript in the format Tue Sep 30 00:00:00 UTC+0200 2014 I send it with http post. On the controller in MVC Web Api I get 29/09/2014 22:00:00.

What is going on and how can I solve it?

1
  • I will answer me question Commented Aug 25, 2014 at 7:23

1 Answer 1

1

I realize that the JSON formater of WebApi convert the date into UTC. therefor what I should do is return the date into local time of the server: TimeZone.CurrentTimeZon.ToLocalTime(dt). Confusing and it was hard to find the answer.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.