As linqtoxsd generates DateTime properties for those, some information is lost during parsing and it's impossible to write xml containing timezone information.
I added one new option, very similar to previously added DateOnly support: <UseDateTimeOffset>.
When it's true, linqtoxsd generates DateTimeOffset properties instead of DateTime.
(This is a global settings, there's no pick-and-choose options now.)
It's a rather small change because System.Xml classes already support converting xs:dateTime into DateTimeOffset, so it mostly "just works".
I added a round-trip test to verify the behavior.
I have issues with some tests failing locally, but I honestly don't think it's related. Do you have known tests failures on master right now?
xs:dateTime
can optionally include an offset.As linqtoxsd generates
DateTime
properties for those, some information is lost during parsing and it's impossible to write xml containing timezone information.I added one new option, very similar to previously added
DateOnly
support:<UseDateTimeOffset>
. When it's true, linqtoxsd generatesDateTimeOffset
properties instead ofDateTime
. (This is a global settings, there's no pick-and-choose options now.)It's a rather small change because System.Xml classes already support converting
xs:dateTime
intoDateTimeOffset
, so it mostly "just works".I added a round-trip test to verify the behavior.
I have issues with some tests failing locally, but I honestly don't think it's related. Do you have known tests failures on
master
right now?