-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[CoreFoundation] Revert some Android regressions that crept in #3088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -899,15 +899,6 @@ static CFTimeZoneRef __CFTimeZoneCreateSystem(void) { | |
CFRelease(name); | ||
if (result) return result; | ||
} | ||
#if TARGET_OS_ANDROID | ||
// Timezone database by name not available on Android. | ||
// Approximate with gmtoff - could be general default. | ||
struct tm info; | ||
time_t now = time(NULL); | ||
if (NULL != localtime_r(&now, &info)) { | ||
return CFTimeZoneCreateWithTimeIntervalFromGMT(kCFAllocatorSystemDefault, info.tm_gmtoff); | ||
} | ||
#endif | ||
return CFTimeZoneCreateWithTimeIntervalFromGMT(kCFAllocatorSystemDefault, 0.0); | ||
} | ||
|
||
|
@@ -1388,7 +1379,7 @@ Boolean _CFTimeZoneInit(CFTimeZoneRef timeZone, CFStringRef name, CFDataRef data | |
return false; | ||
} | ||
} | ||
if (NULL == data && NULL != baseURL) { | ||
if (NULL == data) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MaxDesiatov, unsure what you're trying to do here, was this failing for you without this check on WASI? Android doesn't use Were you just trying to play it safe here or do you need this for WASI? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hard to say, I'm fine with reverting this bit for now. If this breaks anything for us, I'll know who to ping 🙂 |
||
tzName = name; | ||
data = _CFTimeZoneDataCreate(baseURL, tzName); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was removed a couple years ago by @drodriguez, but the recent Catalina merge inadvertently brought it back.