-
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
Timezone convert back and forth on linux is not working #51970
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @tarekgh, @safern Issue DetailsDescriptionWhen I run this code snippet: Configuration
Host (useful for support): .NET SDKs installed: .NET runtimes installed:
Regression?Other information
|
Tagging subscribers to this area: @tannergooding Issue DetailsDescriptionWhen I run this code snippet: Configuration
Host (useful for support): .NET SDKs installed: .NET runtimes installed:
Regression?Other information
|
This is a duplicate of #19794 We are not recommending using |
Description
When I run this code snippet:
TimeZoneInfo.FromSerializedString(TimeZoneInfo.Local.ToSerializedString())
or on powershell core
[TimeZoneInfo]::FromSerializedString([TimeZoneInfo]::Local.ToSerializedString())
then a exception is thrown
"An error occurred while deserializing the object. The serialized data is corrupt."
Configuration
dotnet --info
Host (useful for support):
Version: 5.0.0
Commit: cf258a1
.NET SDKs installed:
No SDKs were found.
.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
PS /app> cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
It is tested at a docker container Enviroment variable:
TZ=Europe/Berlin
Regression?
Other information
If I remove the Enviroment var TZ=Europe/Berlin, default is Etc/UTC then it is working.
The text was updated successfully, but these errors were encountered: