You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
System.Xml.Serialization.XmlSerializer does silently ignore System.DatetimeOffset values #1406
changed the title [-]'System.Xml.Serialization.XmlSerializer` does silently ignore `System.DatetimeOffset` values[/-][+]`System.Xml.Serialization.XmlSerializer` does silently ignore `System.DatetimeOffset` values[/+]on Aug 12, 2018
There is a workaround for this problem, see the full discussion on stackoverflow ...
[XmlElement("lastUpdatedTime")]
public string lastUpdatedTimeForXml // format: 2011-11-11T15:05:46.4733406+01:00
{
get { return lastUpdatedTime.ToString("o"); } // o = yyyy-MM-ddTHH:mm:ss.fffffffzzz
set { lastUpdatedTime = DateTimeOffset.Parse(value); }
}
[XmlIgnore]
public DateTimeOffset lastUpdatedTime;
This is definitely a bug we would like to fix, the fact that it also exists on the full framework complicates matters a bit since it is now much more difficulty to get bug fixes approved for full framework post 4.8. (See Scott's blog)
The "Future" milestone simply means we can't consider it for the current 3.0 release.
The fix will be done in Core for sure, it's too late to get into the 3.0 release so for now it is going into our next big planned release which is 5.0.
It could possibly go into a 3.0 servicing release but we don't know yet if that is possible since 3.0 is not yet out the door.
@drewfreyling Because it has a workaround we are targeting this for one of the upcoming 5.0 preview releases. So it won't be fixed in the servicing branch.
Activity
[-]'System.Xml.Serialization.XmlSerializer` does silently ignore `System.DatetimeOffset` values[/-][+]`System.Xml.Serialization.XmlSerializer` does silently ignore `System.DatetimeOffset` values[/+]huanwu commentedon Sep 13, 2018
@yujayee Could you see if it repro on full framework?
jiayi11 commentedon Sep 19, 2018
It can repro on full framework, the DateTimeOffset value is silently ignored.
drewfreyling commentedon Apr 17, 2019
This sounds like a pretty major bug, I'm astounded it was marked as "Future"
aarondglover commentedon Apr 25, 2019
Just hit this bug tonight.
Serializing a ValueTuple which contains a DateTimeOffset and it is silently ignored!
StephenBonikowsky commentedon Jul 24, 2019
There is a workaround for this problem, see the full discussion on stackoverflow ...
This is definitely a bug we would like to fix, the fact that it also exists on the full framework complicates matters a bit since it is now much more difficulty to get bug fixes approved for full framework post 4.8. (See Scott's blog)
The "Future" milestone simply means we can't consider it for the current 3.0 release.
StephenBonikowsky commentedon Aug 16, 2019
Moving into next release (5.0)
drewfreyling commentedon Aug 16, 2019
Is there any chance of just fixing it in core and not framework for now?
StephenBonikowsky commentedon Aug 17, 2019
The fix will be done in Core for sure, it's too late to get into the 3.0 release so for now it is going into our next big planned release which is 5.0.
It could possibly go into a 3.0 servicing release but we don't know yet if that is possible since 3.0 is not yet out the door.
drewfreyling commentedon Feb 4, 2020
@StephenBonikowsky now that 3.0 is out the door, what is the likelihood of it being fixed in a servicing release?
StephenBonikowsky commentedon Feb 4, 2020
@drewfreyling Because it has a workaround we are targeting this for one of the upcoming 5.0 preview releases. So it won't be fixed in the servicing branch.