Skip to content

Commit 9402945

Browse files
authored
Merge pull request #3088 from buttaface/droid
[CoreFoundation] Revert some Android regressions that crept in
2 parents 26d30e3 + 385de81 commit 9402945

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

CoreFoundation/NumberDate.subproj/CFTimeZone.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -899,15 +899,6 @@ static CFTimeZoneRef __CFTimeZoneCreateSystem(void) {
899899
CFRelease(name);
900900
if (result) return result;
901901
}
902-
#if TARGET_OS_ANDROID
903-
// Timezone database by name not available on Android.
904-
// Approximate with gmtoff - could be general default.
905-
struct tm info;
906-
time_t now = time(NULL);
907-
if (NULL != localtime_r(&now, &info)) {
908-
return CFTimeZoneCreateWithTimeIntervalFromGMT(kCFAllocatorSystemDefault, info.tm_gmtoff);
909-
}
910-
#endif
911902
return CFTimeZoneCreateWithTimeIntervalFromGMT(kCFAllocatorSystemDefault, 0.0);
912903
}
913904

@@ -1388,7 +1379,7 @@ Boolean _CFTimeZoneInit(CFTimeZoneRef timeZone, CFStringRef name, CFDataRef data
13881379
return false;
13891380
}
13901381
}
1391-
if (NULL == data && NULL != baseURL) {
1382+
if (NULL == data) {
13921383
tzName = name;
13931384
data = _CFTimeZoneDataCreate(baseURL, tzName);
13941385
}

0 commit comments

Comments
 (0)