mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 06:26:15 +01:00
Merge branch 'gentoo-timezone' into 'master'
gtimezone: Fallback to /etc/timezone on Gentoo See merge request GNOME/glib!541
This commit is contained in:
commit
1fa24a6852
@ -449,12 +449,17 @@ zone_info_unix (const gchar *identifier,
|
|||||||
G_FILE_ERROR_INVAL);
|
G_FILE_ERROR_INVAL);
|
||||||
g_clear_error (&read_link_err);
|
g_clear_error (&read_link_err);
|
||||||
|
|
||||||
/* Fallback to the content of /var/db/zoneinfo if /etc/localtime is
|
/* Fallback to the content of /var/db/zoneinfo or /etc/timezone
|
||||||
* not a symlink. This is where 'tzsetup' program on FreeBSD and
|
* if /etc/localtime is not a symlink. /var/db/zoneinfo is
|
||||||
* DragonflyBSD stores the timezone chosen by the user. */
|
* where 'tzsetup' program on FreeBSD and DragonflyBSD stores
|
||||||
if (not_a_symlink && g_file_get_contents ("/var/db/zoneinfo",
|
* the timezone chosen by the user. /etc/timezone is where user
|
||||||
&resolved_identifier,
|
* choice is expressed on Gentoo OpenRC and others. */
|
||||||
NULL, NULL))
|
if (not_a_symlink && (g_file_get_contents ("/var/db/zoneinfo",
|
||||||
|
&resolved_identifier,
|
||||||
|
NULL, NULL) ||
|
||||||
|
g_file_get_contents ("/etc/timezone",
|
||||||
|
&resolved_identifier,
|
||||||
|
NULL, NULL)))
|
||||||
g_strchomp (resolved_identifier);
|
g_strchomp (resolved_identifier);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user