-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
util/timeutil: fix get tz at mojave #7784
Conversation
Does it affect macOS High Sierra after this pr merge? |
Nope. Since it falls back to using |
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.
LGTM
LGTM |
/run-all-tests |
/run-common-test |
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.
LGTM
What problem does this PR solve?
After upgrading to macOs Mojave, soft link of
/etc/localtime
had been changed from/var/db/timezone/tz/2018e.1.0/zoneinfo/Asia/Shanghai
to/usr/share/zoneinfo.default/Asia/Shanghai
. A test case failed and this PR addresses this.What is changed and how it works?
inferTZNameFromFileName
is usingzoneinfo
to locate the IANA timezone name. This PR addresses that issue by adding one more logic, which is usingzoneinfo.default
to locate the IANA timezone name first. If nothing can be got, then fall back to usingzoneinfo
.Check List
Tests
Code changes
Side effects
Related changes