[system-tools-backends-clone] Bug 354661 - time-admin fails to lookup "Europe/Helsinki" as time zone value Bug 354661 - time-admi



commit d3ce5e5f0f210a2f9c868526257a0e1444f504a2
Author: Michael Terry <michael terry canonical com>
Date:   Wed Aug 19 01:13:56 2009 +0200

    Bug 354661 - time-admin fails to lookup "Europe/Helsinki" as time zone value Bug 354661 -  time-admin fails to lookup "Europe/Helsinki" as time zone value (Debian/Ubuntu)
    
    The problem is that there are two zoneinfo's that are identical, but system-tools-backend just picks the first one in /usr/share/zoneinfo/zone.tab that matches.
    
    According to http://wiki.debian.org/TimeZoneChanges, Etch and later use /etc/timezone as the preferred location for that info.  Etch is Debian 4.0.According to https://bugs.edge.launchpad.net/ubuntu/+source/tzdata/+bug/209429/comments/16, Ubuntu Edgy and later do the same thing.
    So my patch changes the backend for debian-4.0 (Etch) and ubuntu-7.04 (Feisty) and up.

 Time/TimeDate.pm |   34 ++++++++++++++++++++++++++++++++--
 1 files changed, 32 insertions(+), 2 deletions(-)
---
diff --git a/Time/TimeDate.pm b/Time/TimeDate.pm
index 98de69e..195bc06 100644
--- a/Time/TimeDate.pm
+++ b/Time/TimeDate.pm
@@ -165,8 +165,9 @@ sub get_dist
    "redhat-7.3"      => "redhat-6.2",
    "redhat-8.0"      => "redhat-6.2",
    "mandrake-9.0"    => "redhat-6.2",
-   "debian-3.0"      => "debian-3.0",
-   "ubuntu-7.04"     => "debian-3.0",
+   "debian-4.0"      => "debian-4.0",
+   "debian-testing"  => "debian-4.0",
+   "ubuntu-7.04"     => "debian-4.0",
    "suse-9.0"        => "redhat-6.2",
    "slackware-9.1.0" => "redhat-6.2",
    "gentoo"          => "redhat-6.2",
@@ -212,6 +213,19 @@ sub conf_get_parse_table
      ]
    },
 
+   "debian-4.0" =>
+   {
+     fn =>
+     {
+       TIMEZONE     => "/etc/timezone"
+     },
+     table =>
+     [
+      [ "local_time",   \&get_utc_time ],
+      [ "timezone",     \&Utils::Parse::get_first_line, TIMEZONE ],
+     ]
+   },
+
    "archlinux" =>
    {
      fn =>
@@ -283,6 +297,22 @@ sub conf_get_replace_table
      ]
    },
 
+   "debian-4.0" =>
+   {
+     fn =>
+     {
+       ZONEINFO     => "/usr/share/zoneinfo",
+       LOCAL_TIME   => "/etc/localtime",
+       TIMEZONE     => "/etc/timezone"
+     },
+     table =>
+     [
+      [ "timezone",    \&set_timezone, [LOCAL_TIME, ZONEINFO] ],
+      [ "timezone",    \&Utils::Replace::set_first_line, TIMEZONE ],
+      [ "local_time",  \&set_utc_time ],
+     ]
+   },
+
    "archlinux" =>
    {
      fn =>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]