]> git.pld-linux.org Git - packages/gnome-settings-daemon.git/commitdiff
- use /etc/sysconfig/timezone to read system timezone
authorMarcin Banasiak <marcin.banasiak@gmail.com>
Wed, 16 Mar 2011 22:03:54 +0000 (22:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    use-etc-sysconfig-timezone.patch -> 1.1

use-etc-sysconfig-timezone.patch [new file with mode: 0644]

diff --git a/use-etc-sysconfig-timezone.patch b/use-etc-sysconfig-timezone.patch
new file mode 100644 (file)
index 0000000..c5abfb9
--- /dev/null
@@ -0,0 +1,70 @@
+diff -urN gnome-settings-daemon-2.91.91/plugins/datetime/system-timezone.c gnome-settings-daemon-2.91.91.new//plugins/datetime/system-timezone.c
+--- gnome-settings-daemon-2.91.91/plugins/datetime/system-timezone.c   2011-03-02 18:13:27.000000000 +0000
++++ gnome-settings-daemon-2.91.91.new//plugins/datetime/system-timezone.c      2011-03-16 21:20:28.720003184 +0000
+@@ -55,12 +55,13 @@
+ #include "system-timezone.h"
+ /* Files that we look at */
+-#define ETC_TIMEZONE        "/etc/timezone"
+-#define ETC_TIMEZONE_MAJ    "/etc/TIMEZONE"
+-#define ETC_RC_CONF         "/etc/rc.conf"
+-#define ETC_SYSCONFIG_CLOCK "/etc/sysconfig/clock"
+-#define ETC_CONF_D_CLOCK    "/etc/conf.d/clock"
+-#define ETC_LOCALTIME       "/etc/localtime"
++#define ETC_TIMEZONE           "/etc/timezone"
++#define ETC_TIMEZONE_MAJ       "/etc/TIMEZONE"
++#define ETC_RC_CONF            "/etc/rc.conf"
++#define ETC_SYSCONFIG_CLOCK    "/etc/sysconfig/clock"
++#define ETC_SYSCONFIG_TIMEZONE "/etc/sysconfig/timezone"
++#define ETC_CONF_D_CLOCK       "/etc/conf.d/clock"
++#define ETC_LOCALTIME          "/etc/localtime"
+ /* The first 4 characters in a timezone file, from tzfile.h */
+ #define TZ_MAGIC "TZif"
+@@ -198,6 +199,7 @@
+  *    openSUSE: the TIMEZONE key in /etc/sysconfig/clock
+  *    Solaris/OpenSolaris: the TZ key in /etc/TIMEZONE
+  *    Arch Linux: the TIMEZONE key in /etc/rc.conf
++ *    PLD Linux: the TIMEZONE key in /etc/sysconfig/timezone
+  *    Gentoo (old): the ZONE key in /etc/conf.d/clock
+  *
+  *    FIXME: reading the system-tools-backends, it seems there's this too:
+@@ -472,6 +474,22 @@
+                                                "TIMEZONE", tz, error);
+ }
++/* This works for PLD Linux */
++static char *
++system_timezone_read_etc_sysconfig_timezone (void)
++{
++      return system_timezone_read_key_file (ETC_SYSCONFIG_TIMEZONE,
++                                            "TIMEZONE");
++}
++
++static gboolean
++system_timezone_write_etc_sysconfig_timezone (const char *tz,
++                                             GError **error)
++{
++      return system_timezone_write_key_file (ETC_SYSCONFIG_TIMEZONE,
++                                             "TIMEZONE", tz, error);
++}
++
+ /* This works for Arch Linux */
+ static char *
+ system_timezone_read_etc_rc_conf (void)
+@@ -696,6 +713,7 @@
+         system_timezone_read_etc_timezone,
+         system_timezone_read_etc_sysconfig_clock,
+         system_timezone_read_etc_sysconfig_clock_alt,
++        system_timezone_read_etc_sysconfig_timezone,
+         system_timezone_read_etc_TIMEZONE,
+         system_timezone_read_etc_rc_conf,
+         /* reading deprecated config files */
+@@ -866,6 +884,7 @@
+         system_timezone_write_etc_timezone,
+         system_timezone_write_etc_sysconfig_clock,
+         system_timezone_write_etc_sysconfig_clock_alt,
++        system_timezone_write_etc_sysconfig_timezone,
+         system_timezone_write_etc_TIMEZONE,
+         system_timezone_write_etc_rc_conf,
+         /* writing deprecated config files if they exist and have the
This page took 0.186446 seconds and 4 git commands to generate.