Created
February 14, 2011 20:07
-
-
Save jamesantrobus/826443 to your computer and use it in GitHub Desktop.
Workaround for Newtonsoft.Json issue 5 https://github.com/chrisntr/Newtonsoft.Json/issues#issue/5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GetUtcOffSet - JsonConvert.cs Line 111 | |
private static TimeSpan GetUtcOffset(DateTime dateTime) | |
{ | |
#if SILVERLIGHT | |
return TimeZoneInfo.Local.GetUtcOffset(dateTime); | |
#else | |
return TimeZone.CurrentTimeZone.GetUtcOffset(dateTime); | |
#endif | |
} | |
Replacing with this fixes the issue | |
private static TimeSpan GetUtcOffset(DateTime dateTime) | |
{ | |
return TimeZone.CurrentTimeZone.GetUtcOffset(dateTime); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment