-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blazor: DateTime.ToString("o") and JsonSerializer.Serialize(DateTime) has a different result in wasm runtime #54343
Comments
Tagging subscribers to this area: @eiriktsarpalis, @layomia Issue DetailsDescribe the bugFor local DateTime values which are smaller than To Reproduce
Exceptions (if any)Further technical details
|
This is likely to do with the history of your local timezone. In the late 1800s it wasn't uncommon for certain regions to run both "Railroad time" (which was agreed-upon throughout the country) and "Local time" (which was different between towns/cities, and therefor could be off by a few minutes relative to Railroad time). The key thing to realize here is that at some point in time, the decision has been made to switch every city/town to "Railroad time" so that it'd all be in sync. Evidently, the timezone data that is consulted for the conversion believes that |
@Joe4evr Thank you. |
Now I understand why this happened. However, this makes difference between .Net implements. We still want the same behavior in all .Net implements. |
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsDescribe the bugFor local DateTime values which are smaller than To Reproduce
Exceptions (if any)Further technical details
|
System.Text.Json uses the |
Tagging subscribers to this area: @GrabYourPitchforks, @dotnet/area-system-buffers Issue DetailsDescribe the bugFor local DateTime values which are smaller than To Reproduce
Exceptions (if any)Further technical details
|
Describe the bug
For local DateTime values which are smaller than
1900-12-31 23:59:17
,System.Text.Json.JsonSerializer.Serialize(DateTime)
has a different result in wasm runtime(+08:05 vs +08:00).To Reproduce
Exceptions (if any)
Further technical details
dotnet --info
The text was updated successfully, but these errors were encountered: