···1+From the discussion in http://groups.google.com/group/taskjuggler-users/browse_thread/thread/f65a3efd4dcae2fc/a44c711a9d28ebee?show_docid=a44c711a9d28ebee
2+3+From: Chris Schlaeger <cs@kde.org>
4+Date: Sat, 27 Feb 2010 06:33:35 +0000 (+0100)
5+Subject: Try to fix time zone check for glibc 2.11.
6+X-Git-Url: http://www.taskjuggler.org/cgi-bin/gitweb.cgi?p=taskjuggler.git;a=commitdiff_plain;h=2382ed54f90c3c899badb3f56aaa2b3b5dba361e;hp=c666c5068312fec7db75e17d1c567d94127d1dda
7+8+Try to fix time zone check for glibc 2.11.
9+10+Reported-by: Lee <pFQh8RQn4fqB@dyweni.com>
11+---
12+13+diff --git a/taskjuggler/Utility.cpp b/taskjuggler/Utility.cpp
14+index 5e2bf21..9b7fce2 100644
15+--- a/taskjuggler/Utility.cpp
16++++ b/taskjuggler/Utility.cpp
17+@@ -206,16 +206,28 @@ setTimezone(const char* tZone)
18+19+ /* To validate the tZone value we call tzset(). It will convert the zone
20+ * into a three-letter acronym in case the tZone value is good. If not, it
21+- * will just copy the wrong value to tzname[0] (glibc < 2.5) or fall back
22+- * to UTC. */
23++ * will
24++ * - copy the wrong value to tzname[0] (glibc < 2.5)
25++ * - or fall back to UTC (glibc >= 2.5 && < 2.11)
26++ * - copy the part before the '/' to tzname[0] (glibc >= 2.11).
27++ */
28+ tzset();
29++ char* region = new(char[strlen(tZone) + 1]);
30++ region[0] = 0;
31++ if (strchr(tZone, '/'))
32++ {
33++ strcpy(region, tZone);
34++ *strchr(region, '/') = 0;
35++ }
36+ if (timezone2tz(tZone) == 0 &&
37+- (strcmp(tzname[0], tZone) == 0 ||
38++ (strcmp(tzname[0], tZone) == 0 || strcmp(tzname[0], region) == 0 ||
39+ (strcmp(tZone, "UTC") != 0 && strcmp(tzname[0], "UTC") == 0)))
40+ {
41+ UtilityError = QString(i18n("Illegal timezone '%1'")).arg(tZone);
42++ delete region;
43+ return false;
44+ }
45++ delete region;
46+47+ if (!LtHashTab)
48+ return true;
+1-1
pkgs/top-level/all-packages.nix
···67396740 teamspeak_client = callPackage ../applications/networking/instant-messengers/teamspeak/client.nix { };
67416742- taskJuggler = callPackage ../applications/misc/taskjuggler {
6743 qt = qt3;
67446745 # KDE support is not working yet.
···67396740 teamspeak_client = callPackage ../applications/networking/instant-messengers/teamspeak/client.nix { };
67416742+ taskjuggler = callPackage ../applications/misc/taskjuggler {
6743 qt = qt3;
67446745 # KDE support is not working yet.