mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
timezon: add support for tz package
Some distributions don't use /etc/localtime but /etc/TZ instead. If /etc/localtime isn't find try this. For details see #2818
This commit is contained in:
@@ -1567,9 +1567,11 @@ char* freerdp_get_unix_timezone_identifier()
|
||||
* On linux distros such as Redhat or Archlinux, a symlink at /etc/localtime
|
||||
* will point to /usr/share/zoneinfo/region/place where region/place could be
|
||||
* America/Montreal for example.
|
||||
* Some distributions do have to symlink at /etc/TZ.
|
||||
*/
|
||||
|
||||
if ((len = readlink("/etc/localtime", buf, sizeof(buf) - 1)) != -1)
|
||||
if ((len = readlink("/etc/localtime", buf, sizeof(buf) - 1)) != -1 ||
|
||||
(len = readlink("/etc/TZ", buf, sizeof(buf) - 1)) != -1)
|
||||
{
|
||||
int num = 0;
|
||||
int pos = len;
|
||||
|
||||
Reference in New Issue
Block a user