Reputation: 2904
According to https://devblogs.microsoft.com/dotnet/date-time-and-time-zone-enhancements-in-net-6/#time-zone-conversion-apis, with .NET 6 we should be able to use both IANA and Windows Time Zone identifier formats.
However this doesn't work in Blazor WASM (client side), where only IANA format seems to be recognized.
Does anyone know if this is the intended behaviour or a bug or a WIP?
Upvotes: 2
Views: 406
Reputation: 462
It is by design as this issue (GitHub issue) tells. When passing data between Blazor and JavaScript, every data get serialized and passed and then de-serialized to use in other runtime (Marshalling). .Net DateTimeOffset
only can be get from IANA format in JSON Deserialization ("2020-05-21T02:33:11.188+01:30"
):
Upvotes: 2