Proceed to look for the next timezone when matching a localized
authorMagnus Hagander <magnus@hagander.net>
Thu, 8 Apr 2010 11:26:06 +0000 (11:26 +0000)
committerMagnus Hagander <magnus@hagander.net>
Thu, 8 Apr 2010 11:26:06 +0000 (11:26 +0000)
Windows timezone name where the information in the registry is
incomplete, instead of aborting.

This fixes cases when the registry information is incomplete for
a timezone that is alphabetically before the one that is in use.

Per report from Alexander Forschner

src/timezone/pgtz.c

index 6d0df5dc0cf932d8631f7a7e0f17e6233ae28720..f650f463a72ee2b1c4955dfdbf40364db9566702 100644 (file)
@@ -6,7 +6,7 @@
  * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.63.2.1 2010/04/06 20:35:17 mha Exp $
+ *   $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.63.2.2 2010/04/08 11:26:06 mha Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1090,7 +1090,7 @@ identify_system_timezone(void)
                    (errmsg_internal("could not query value for 'std' to identify Windows timezone \"%s\": %i",
                                     keyname, (int) r)));
            RegCloseKey(key);
-           break;
+           continue; /* Proceed to look at the next timezone */
        }
        if (strcmp(tzname, zonename) == 0)
        {
@@ -1107,7 +1107,7 @@ identify_system_timezone(void)
                    (errmsg_internal("could not query value for 'dlt' to identify Windows timezone \"%s\": %i",
                                     keyname, (int) r)));
            RegCloseKey(key);
-           break;
+           continue; /* Proceed to look at the next timezone */
        }
        if (strcmp(tzname, zonename) == 0)
        {