Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upXmlProvider does not parse DateTimeOffset values in format "YYYY-MM-DDThh:mm:ss" #1301
Comments
|
I'm afraid it's a bug because the XML is valid. An ugly workaround is to avoid accessing the BirthDate property and use the untyped XElement property instead to read the element value |
|
@giacomociti thank you for your answer, I was afraid of that. I am using exactly the same workaround as you have described, so it at least does not block. I will keep it in the code until this issue gets resolved. |
|
this commit may fix the issue, but I haven't submitted a PR yet because it is a breaking change for the other type providers (notice I had to change a test of CSV provider). The problem is that the parsing functions are shared by all type providers. |
|
Thank you for a quick fix! I am on different project at the moment, I will try the fix next week. |
|
@giacomociti that does it for me, thank you |
This problem is related to FSharp.Data version 3.3.3.
I am trying to create XmlProvider from XSD but it fails on parsing
xs:dateTimevalues. When trying to access the property, I am getting an errorSystem.Exception: Expecting DateTimeOffset in Value, got 2020-01-20T12:15:00The same problem happens when accessing XML Values and when accessing XML Attributes.
See the minimal example below.
Is there some workaround or setting that I am missing or is this a bug?
thank you.