>From 2d77d4ce3e00cdbde85b0860e1796082809bc6bd Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Tue, 16 Aug 2011 10:17:33 +0000 Subject: [PATCH 1/2] Revert "in icaltimezone_get_builtin_timezone_from_tzid(), skip past the 4th '/' character" This reverts commit a65a0894ce7cf9672f9837dd38a95bbcba84b49b. Builting TZIDs do not have four slashes. Therefore the change to icaltimezone_get_builtin_timezone_from_tzid() is incorrect. --- libical/src/libical/icaltimezone.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/libical/src/libical/icaltimezone.c b/libical/src/libical/icaltimezone.c index b4d998a..3a855c9 100644 --- a/libical/src/libical/icaltimezone.c +++ b/libical/src/libical/icaltimezone.c @@ -1477,18 +1477,17 @@ icaltimezone_get_builtin_timezone_from_tzid (const char *tzid) if (strncmp (tzid, ical_tzid_prefix, strlen(ical_tzid_prefix))) return NULL; - /* Get the location, which is after the 4th '/' character. */ - /* format is /unique_prefix/Olson_X/Tzfile/location */ + /* Get the location, which is after the 3rd '/' character. */ p = tzid; for (p = tzid; *p; p++) { if (*p == '/') { num_slashes++; - if (num_slashes == 4) + if (num_slashes == 3) break; } } - if (num_slashes != 4) + if (num_slashes != 3) return NULL; p++; -- 1.7.2.5