mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fix for deleting TimeZoneInfo.Utc on non-Windows
This commit is contained in:
parent
a64cf01751
commit
678bdc0ba6
1 changed files with 5 additions and 1 deletions
|
@ -127,7 +127,11 @@ namespace System {
|
|||
TimeZoneInfo timeZone = m_localTimeZone;
|
||||
if (timeZone == null) {
|
||||
let localTimeZone = TimeZoneInfo.GetLocalTimeZone(this);
|
||||
defer delete localTimeZone;
|
||||
defer
|
||||
{
|
||||
if (localTimeZone != Utc)
|
||||
delete localTimeZone;
|
||||
}
|
||||
|
||||
// this step is to break the reference equality
|
||||
// between TimeZoneInfo.Local and a second time zone
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue