mgholam / fastJSON

Smallest, fastest polymorphic JSON serializer
https://www.codeproject.com/Articles/159450/fastJSON-Smallest-Fastest-Polymorphic-JSON-Seriali
MIT License
479 stars 147 forks source link

UTC dates become Local when parsed #11

Open bruce965 opened 9 years ago

bruce965 commented 9 years ago

DateTimeKind.Utc dates become DateTimeKind.Local when parsed, time is parsed correctly.

I guess the problem is around here. The date should probably be constructed as either Local or Utc depending on the value of utc boolean. The constructed data should then be converted to the other format, only if _params.UseUTCDateTime differs from utc.

Thanks! :)

xmedeko commented 5 years ago

Yes, that's annoying bug, please fix it. Thanks. I think just the ToLocalTime() should be removed.