Skip to content

Commit b5b592e

Browse files
committed
Unity fixes for finding the local timezone
Not all platforms we support reading timezones from disk but can report Local
1 parent 5d2e398 commit b5b592e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

external/corefx-bugfix/src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,14 @@ public static TimeZoneInfo FindSystemTimeZoneById(string id)
700700
return Utc;
701701
}
702702

703+
#if (UNITY_AOT && FULL_AOT_RUNTIME) || UNITY_JIT
704+
// Not all platforms we support reading timezones from disk but can report Local
705+
if (string.Equals(id, LocalId, StringComparison.OrdinalIgnoreCase))
706+
{
707+
return Local;
708+
}
709+
#endif
710+
703711
if (id == null)
704712
{
705713
throw new ArgumentNullException(nameof(id));

0 commit comments

Comments
 (0)