I am a game developer. Recently one of the players send to me an output.log where there are a lot of errors:
InvalidTimeZoneException: Exception of type 'System.InvalidTimeZoneException' was thrown.
at System.TimeZoneInfo.FromRegistryKey (System.String id, Microsoft.Win32.RegistryKey key) [0x00014] in <c8d0d7b9135640958bff528a1e374758>:0
at System.TimeZoneInfo.FindSystemTimeZoneById (System.String id) [0x0003f] in <c8d0d7b9135640958bff528a1e374758>:0
at System.TimeZoneInfo.CreateLocal () [0x00053] in <c8d0d7b9135640958bff528a1e374758>:0
at System.TimeZoneInfo.get_Local () [0x00009] in <c8d0d7b9135640958bff528a1e374758>:0
at System.TimeZoneInfo.GetDateTimeNowUtcOffsetFromUtc (System.DateTime time, System.Boolean& isAmbiguousLocalDst) [0x00000] in <c8d0d7b9135640958bff528a1e374758>:0
at System.DateTime.get_Now () [0x00008] in <c8d0d7b9135640958bff528a1e374758>:0
at UnityEngine.GUI..cctor () [0x00089] in <22f4964958684322850dc0d6e1fb8a07>:0
Rethrow as TypeInitializationException: The type initializer for 'UnityEngine.GUI' threw an exception.
at UnityEngine.GUIUtility.ResetGlobalState () [0x00001] in <22f4964958684322850dc0d6e1fb8a07>:0
at UnityEngine.GUIUtility.BeginGUI (System.Int32 skinMode, System.Int32 instanceID, System.Int32 useGUILayout) [0x0000d] in <22f4964958684322850dc0d6e1fb8a07>:0
I am a little confused because I read that this issue should be fixed in Unity version (2018.4.35f1, .NET 4.x compatibility level) used by my game:
Player described that value of key:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation
in his computer is: China Standard Time
Now I am thinking whether exists some workarounds to fix this problem…