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
PeriodSerializer doesn't deserialize a period's duration correctly if the start IDateTime's time is set to midnight.
E.g. the following period string should be serialized to a period with a duration of 6H but actually has 1D: 20180219T000000Z/PT6H
20180219T000000Z/PT6H
Can be reproduced via the following test case:
[Test] public void TestPeriods() { var serializer = new PeriodSerializer(); var res = serializer.Deserialize(new System.IO.StringReader("20180219T000000Z/PT6H")) as Period; Assert.AreEqual(6.0, res.Duration.Hours); Assert.IsTrue(res.StartTime.HasTime); }
The problem boils down to Period automatically assuming a duration of 1D if the time component is zero.
Period
The text was updated successfully, but these errors were encountered:
No branches or pull requests
PeriodSerializer doesn't deserialize a period's duration correctly if the start IDateTime's time is set to midnight.
E.g. the following period string should be serialized to a period with a duration of 6H but actually has 1D:
20180219T000000Z/PT6H
Can be reproduced via the following test case:
The problem boils down to
Period
automatically assuming a duration of 1D if the time component is zero.The text was updated successfully, but these errors were encountered: