Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not accept timezone name if it's not in region/city format
The code in plugins/datetime/system-timezone.c does its best to determine timezone name. Upstream python code in `cinnamon-setting calendar` expects timezone name in `Region/City` format. So recursive_compare() handles cases when /etc/localtime and files in /usr/share/zoneinfo are symlinks, hardlinks, copies, etc to provide the proper name. This patch fixes case when all timezone files are copies. Instead of returning the first timzeon file (name) found in SYSTEM_ZONEINFODIR (/usr/share/zoneinfo) it keeps looking for a name with a slash "/" in the name. Example: A user lives in US Colorado near Denver. The timezone name `cinnamon-setting calendar` would expect is America/Denver. If the user is using OS where all the timezone files are copies (not any kind of links) `cinnamon-setting calendar` would fail. That happens because the `plugins/datetime/system-timezone.c` code would be searching SYSTEM_ZONEINFODIR folder and would find `/usr/share/zoneinfo/Navajo` file first. So `cinnamon-setting calendar` would get `Navajo` instead of `Americs/Denver` as timezone name. Fix this issue by checking for a slash in the timezone name and keep looking if it's not the case.
- Loading branch information