-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Flips a conditional check when parsing time zone data. #126
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
Flips a conditional check when parsing time zone data. #126
Conversation
@@ -1079,7 +1079,7 @@ Boolean _CFTimeZoneInit(CFTimeZoneRef timeZone, CFStringRef name, CFDataRef data | |||
CFTZPeriod *tzp = NULL; | |||
CFIndex cnt = 0; | |||
__CFTimeZoneLockGlobal(); | |||
if (!__CFParseTimeZoneData(kCFAllocatorSystemDefault, data, &tzp, &cnt)) { | |||
if (__CFParseTimeZoneData(kCFAllocatorSystemDefault, data, &tzp, &cnt)) { |
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.
Nice catch.
Unfortunately our handling of time zones on Ubuntu 14.04 at least is broken; CFTimeZone.c does not fall back to |
I pushed a commit to start towards a fix of the last thing, but it's still not enough yet. |
Fixes a type in the the tryParseGMTName function.
I think I've found the issue. The tryParseGMTName function was using a Boolean for something that needed be a String index, and this seems to behave differently on Linux than on Mac OS, and restricts the values to 0 or 1. I've updated the commit with a fix for this, and the tests are passing on my Linux install. |
This commit also takes a lot of shorthands because the tests only use a GMT+XXXX time zone, rather than a proper named one. My main motivation for this patch is that it will provide enough time zone support to address SR-171, which causes test failures on both Mac and Linux when the system time is around GMT+11. |
I have a fix pending for SR-190, then I'll revisit this with that in place. |
Thanks for getting to the bottom of that string encoding conversion bug. |
Implement "textDocument/implementation" request
[pull] swiftwasm from master
No description provided.