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
It turns out that in the case of DateTimeOffset.ToString(), we run into localization issues, even though we fully specify the output format. This behaviour is different from the XmlConvert.ToString(), which we have used before.
The solution is to explicitly tag the invariant culture along:
I am pretty sure this logic is present in other parts of the new System types, and newer serializers so we should ensure we look a bit further than just the serializers.
The text was updated successfully, but these errors were encountered:
Torben Hagensen reported on Zulip (https://chat.fhir.org/#narrow/stream/179171-dotnet/topic/Serializing.20instant.20elements) that the new serializers are formatting the Instant type incorrectly, and indeed it is easy to reproduce that our serialization logic is sensitive to locale:
It turns out that in the case of
DateTimeOffset.ToString()
, we run into localization issues, even though we fully specify the output format. This behaviour is different from theXmlConvert.ToString()
, which we have used before.The solution is to explicitly tag the invariant culture along:
// Returns 2023-10-26T13:27:49.0572969+02:00
now.ToString(FMT_FULL, CultureInfo.InvariantCulture).Dump();
I am pretty sure this logic is present in other parts of the new System types, and newer serializers so we should ensure we look a bit further than just the serializers.
The text was updated successfully, but these errors were encountered: