From 611b94cb41e3708009a68fcff9e6af3b3ffd60a6 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Fri, 12 Jul 2019 14:56:45 -0400 Subject: [PATCH] =?utf8?q?[ios]=20Nil=20Check=20to=20Ensure=20Local=20Time?= =?utf8?q?Zone=20Id=20is=20Set=20For=20TimeZon=E2=80=A6=20(#15682)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In runtime.m added nil check in xamarin_timezone_get_local_name. Returns Local as the Id in the case of nil. --- sdks/ios/runtime/runtime.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/ios/runtime/runtime.m b/sdks/ios/runtime/runtime.m index 76c7377745f..6f6fa12ab5a 100644 --- a/sdks/ios/runtime/runtime.m +++ b/sdks/ios/runtime/runtime.m @@ -368,7 +368,7 @@ xamarin_timezone_get_local_name () NSTimeZone *tz = nil; tz = [NSTimeZone localTimeZone]; NSString *name = [tz name]; - return strdup ([name UTF8String]); + return (name != nil) ? strdup ([name UTF8String]) : strdup ("Local"); } char** -- 2.11.4.GIT