0

I am already storing UTC time in DateTime objects.

When I send this across using Json() serializer these dates are again converted to UTC. I don't want this to happen.

Please help.

tereško
58.5k26 gold badges100 silver badges151 bronze badges
asked Apr 13, 2012 at 9:42
2
  • Check the Kind property of your DateTime objects, maybe they are not marked as UTC then they get converted again. Commented Apr 13, 2012 at 9:45
  • You are right. Please add this as a answer so that I can mark it as correct answer Commented Apr 13, 2012 at 10:20

1 Answer 1

3

Check the Kind property of your DateTime objects, maybe they are not marked as UTC then they get converted again.

answered Apr 13, 2012 at 10:40
2
  • Where is this 'Kind' property? What should it look like? Commented Sep 23, 2014 at 9:48
  • 1
    @jao it's a property of DateTime objects has, for example: var date = DateTime.Now; Console.WriteLine(date.Kind.ToString()); Commented Sep 23, 2014 at 20:13

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.