bugthesystem / FireSharp

An asynchronous cross-platform .Net library for Firebase
The Unlicense
697 stars 147 forks source link

Do not modify date strings on Update #87

Closed AButler closed 7 years ago

AButler commented 7 years ago

If a date property is updated, then the OnAsync changed delegate would get the date value automatically changed in to a different string representation of the date, e.g. 2016-05-05T11:42:01.013Z would get changed in to 05/05/2016 11:42.01. This is because Json.Net automatically attempts to deserialize DateTime strings in to DateTime objects, then when cast back to a string it uses the default DateTime.ToString().

This behaviour can be disabled using DateParseHandling.None.

See http://www.newtonsoft.com/json/help/html/T_Newtonsoft_Json_DateParseHandling.htm

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.09%) to 42.644% when pulling f2ed4d3cfb4eadc7a0b67f521e9950b30e5a63f2 on AButler:do-not-modify-date into 7b575d9ac3ee919398d574a8b2008b9949c430e7 on ziyasal:master.