We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, by deserialize a DateTime object on a german windows the new DateTime is wrong (see example).
DateTime date = new DateTime(2015, 7, 20); YAXLib.YAXSerializer s = new YAXLib.YAXSerializer(typeof(DateTime)); string xml = s.Serialize(date); Console.WriteLine(xml); // <DateTime>07/20/2015 00:00:00</DateTime> object obj = s.Deserialize(xml); Console.WriteLine(obj); // 01.01.0001 00:00:00
This is because the ParseDateTimeTimeZoneSafe method in the StringUtils.cs class does not use the IFormatProvider parameter. Instead of using:
ParseDateTimeTimeZoneSafe
StringUtils.cs
IFormatProvider
if (!DateTimeOffset.TryParse(str, out dto))
you must use:
if (!DateTimeOffset.TryParse(str, formatProvider, System.Globalization.DateTimeStyles.None, out dto))
Thank you for fixing this issue. Gordon
The text was updated successfully, but these errors were encountered:
Is this fixed?
Sorry, something went wrong.
I think not, but you could send a PR for it?
Fixed with #58
No branches or pull requests
Hello,
by deserialize a DateTime object on a german windows the new DateTime is wrong (see example).
This is because the
ParseDateTimeTimeZoneSafe
method in theStringUtils.cs
class does not use theIFormatProvider
parameter. Instead of using:you must use:
Thank you for fixing this issue.
Gordon
The text was updated successfully, but these errors were encountered: