Index: doc/clock.n
==================================================================
Index: generic/tclDate.c
==================================================================
--- generic/tclDate.c
+++ generic/tclDate.c
@@ -626,15 +626,15 @@
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
        0,   223,   223,   224,   227,   230,   233,   236,   239,   242,
-     245,   249,   254,   257,   263,   269,   277,   283,   294,   298,
-     302,   308,   312,   316,   320,   324,   330,   334,   339,   344,
-     349,   354,   358,   363,   367,   372,   379,   383,   389,   399,
-     408,   417,   427,   441,   446,   449,   452,   455,   458,   461,
-     466,   469,   474,   478,   482,   488,   506,   509
+     245,   249,   254,   257,   263,   269,   277,   283,   294,   299,
+     304,   310,   314,   318,   322,   326,   332,   336,   341,   346,
+     351,   356,   360,   365,   369,   374,   381,   385,   391,   401,
+     410,   419,   429,   443,   448,   451,   454,   457,   460,   463,
+     468,   471,   476,   480,   484,   490,   508,   511
 };
 #endif
 
 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
@@ -1731,18 +1731,20 @@
 
   case 18:
 
     {
 	    yyTimezone = (yyvsp[(1) - (2)].Number);
+	    if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100);
 	    yyDSTmode = DSTon;
 	;}
     break;
 
   case 19:
 
     {
 	    yyTimezone = (yyvsp[(1) - (1)].Number);
+	    if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100);
 	    yyDSTmode = DSToff;
 	;}
     break;
 
   case 20:
@@ -1897,11 +1899,11 @@
     break;
 
   case 38:
 
     {
-	    if ((yyvsp[(6) - (11)].Number) != HOUR( 7)) YYABORT;
+	    if ((yyvsp[(6) - (11)].Number) != HOUR( 7) + HOUR(100)) YYABORT;
 	    yyYear = (yyvsp[(1) - (11)].Number);
 	    yyMonth = (yyvsp[(3) - (11)].Number);
 	    yyDay = (yyvsp[(5) - (11)].Number);
 	    yyHour = (yyvsp[(7) - (11)].Number);
 	    yyMinutes = (yyvsp[(9) - (11)].Number);
@@ -1910,11 +1912,11 @@
     break;
 
   case 39:
 
     {
-	    if ((yyvsp[(2) - (3)].Number) != HOUR( 7)) YYABORT;
+	    if ((yyvsp[(2) - (3)].Number) != HOUR( 7) + HOUR(100)) YYABORT;
 	    yyYear = (yyvsp[(1) - (3)].Number) / 10000;
 	    yyMonth = ((yyvsp[(1) - (3)].Number) % 10000)/100;
 	    yyDay = (yyvsp[(1) - (3)].Number) % 100;
 	    yyHour = (yyvsp[(3) - (3)].Number) / 10000;
 	    yyMinutes = ((yyvsp[(3) - (3)].Number) % 10000)/100;
@@ -1923,11 +1925,11 @@
     break;
 
   case 40:
 
     {
-	    if ((yyvsp[(2) - (7)].Number) != HOUR( 7)) YYABORT;
+	    if ((yyvsp[(2) - (7)].Number) != HOUR( 7) + HOUR(100)) YYABORT;
 	    yyYear = (yyvsp[(1) - (7)].Number) / 10000;
 	    yyMonth = ((yyvsp[(1) - (7)].Number) % 10000)/100;
 	    yyDay = (yyvsp[(1) - (7)].Number) % 100;
 	    yyHour = (yyvsp[(3) - (7)].Number);
 	    yyMinutes = (yyvsp[(5) - (7)].Number);
@@ -2474,35 +2476,35 @@
 /*
  * Military timezone table.
  */
 
 static const TABLE MilitaryTable[] = {
-    { "a",	tZONE,	-HOUR( 1) },
-    { "b",	tZONE,	-HOUR( 2) },
-    { "c",	tZONE,	-HOUR( 3) },
-    { "d",	tZONE,	-HOUR( 4) },
-    { "e",	tZONE,	-HOUR( 5) },
-    { "f",	tZONE,	-HOUR( 6) },
-    { "g",	tZONE,	-HOUR( 7) },
-    { "h",	tZONE,	-HOUR( 8) },
-    { "i",	tZONE,	-HOUR( 9) },
-    { "k",	tZONE,	-HOUR(10) },
-    { "l",	tZONE,	-HOUR(11) },
-    { "m",	tZONE,	-HOUR(12) },
-    { "n",	tZONE,	HOUR(  1) },
-    { "o",	tZONE,	HOUR(  2) },
-    { "p",	tZONE,	HOUR(  3) },
-    { "q",	tZONE,	HOUR(  4) },
-    { "r",	tZONE,	HOUR(  5) },
-    { "s",	tZONE,	HOUR(  6) },
-    { "t",	tZONE,	HOUR(  7) },
-    { "u",	tZONE,	HOUR(  8) },
-    { "v",	tZONE,	HOUR(  9) },
-    { "w",	tZONE,	HOUR( 10) },
-    { "x",	tZONE,	HOUR( 11) },
-    { "y",	tZONE,	HOUR( 12) },
-    { "z",	tZONE,	HOUR( 0) },
+    { "a",	tZONE,	-HOUR( 1) + HOUR(100) },
+    { "b",	tZONE,	-HOUR( 2) + HOUR(100) },
+    { "c",	tZONE,	-HOUR( 3) + HOUR(100) },
+    { "d",	tZONE,	-HOUR( 4) + HOUR(100) },
+    { "e",	tZONE,	-HOUR( 5) + HOUR(100) },
+    { "f",	tZONE,	-HOUR( 6) + HOUR(100) },
+    { "g",	tZONE,	-HOUR( 7) + HOUR(100) },
+    { "h",	tZONE,	-HOUR( 8) + HOUR(100) },
+    { "i",	tZONE,	-HOUR( 9) + HOUR(100) },
+    { "k",	tZONE,	-HOUR(10) + HOUR(100) },
+    { "l",	tZONE,	-HOUR(11) + HOUR(100) },
+    { "m",	tZONE,	-HOUR(12) + HOUR(100) },
+    { "n",	tZONE,	HOUR(  1) + HOUR(100) },
+    { "o",	tZONE,	HOUR(  2) + HOUR(100) },
+    { "p",	tZONE,	HOUR(  3) + HOUR(100) },
+    { "q",	tZONE,	HOUR(  4) + HOUR(100) },
+    { "r",	tZONE,	HOUR(  5) + HOUR(100) },
+    { "s",	tZONE,	HOUR(  6) + HOUR(100) },
+    { "t",	tZONE,	HOUR(  7) + HOUR(100) },
+    { "u",	tZONE,	HOUR(  8) + HOUR(100) },
+    { "v",	tZONE,	HOUR(  9) + HOUR(100) },
+    { "w",	tZONE,	HOUR( 10) + HOUR(100) },
+    { "x",	tZONE,	HOUR( 11) + HOUR(100) },
+    { "y",	tZONE,	HOUR( 12) + HOUR(100) },
+    { "z",	tZONE,	HOUR( 0)  + HOUR(100) },
     { NULL, 0, 0 }
 };
 
 /*
  * Dump error messages in the bit bucket.

Index: generic/tclGetDate.y
==================================================================
--- generic/tclGetDate.y
+++ generic/tclGetDate.y
@@ -291,14 +291,16 @@
 	}
 	;
 
 zone	: tZONE tDST {
 	    yyTimezone = $1;
+	    if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100);
 	    yyDSTmode = DSTon;
 	}
 	| tZONE {
 	    yyTimezone = $1;
+	    if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100);
 	    yyDSTmode = DSToff;
 	}
 	| tDAYZONE {
 	    yyTimezone = $1;
 	    yyDSTmode = DSTon;
@@ -386,29 +388,29 @@
 	}
 	;
 
 iso	: tUNUMBER '-' tUNUMBER '-' tUNUMBER tZONE
 		tUNUMBER ':' tUNUMBER ':' tUNUMBER {
-	    if ($6 != HOUR( 7)) YYABORT;
+	    if ($6 != HOUR( 7) + HOUR(100)) YYABORT;
 	    yyYear = $1;
 	    yyMonth = $3;
 	    yyDay = $5;
 	    yyHour = $7;
 	    yyMinutes = $9;
 	    yySeconds = $11;
 	}
 	| tISOBASE tZONE tISOBASE {
-	    if ($2 != HOUR( 7)) YYABORT;
+	    if ($2 != HOUR( 7) + HOUR(100)) YYABORT;
 	    yyYear = $1 / 10000;
 	    yyMonth = ($1 % 10000)/100;
 	    yyDay = $1 % 100;
 	    yyHour = $3 / 10000;
 	    yyMinutes = ($3 % 10000)/100;
 	    yySeconds = $3 % 100;
 	}
 	| tISOBASE tZONE tUNUMBER ':' tUNUMBER ':' tUNUMBER {
-	    if ($2 != HOUR( 7)) YYABORT;
+	    if ($2 != HOUR( 7) + HOUR(100)) YYABORT;
 	    yyYear = $1 / 10000;
 	    yyMonth = ($1 % 10000)/100;
 	    yyDay = $1 % 100;
 	    yyHour = $3;
 	    yyMinutes = $5;
@@ -683,35 +685,35 @@
 /*
  * Military timezone table.
  */
 
 static const TABLE MilitaryTable[] = {
-    { "a",	tZONE,	-HOUR( 1) },
-    { "b",	tZONE,	-HOUR( 2) },
-    { "c",	tZONE,	-HOUR( 3) },
-    { "d",	tZONE,	-HOUR( 4) },
-    { "e",	tZONE,	-HOUR( 5) },
-    { "f",	tZONE,	-HOUR( 6) },
-    { "g",	tZONE,	-HOUR( 7) },
-    { "h",	tZONE,	-HOUR( 8) },
-    { "i",	tZONE,	-HOUR( 9) },
-    { "k",	tZONE,	-HOUR(10) },
-    { "l",	tZONE,	-HOUR(11) },
-    { "m",	tZONE,	-HOUR(12) },
-    { "n",	tZONE,	HOUR(  1) },
-    { "o",	tZONE,	HOUR(  2) },
-    { "p",	tZONE,	HOUR(  3) },
-    { "q",	tZONE,	HOUR(  4) },
-    { "r",	tZONE,	HOUR(  5) },
-    { "s",	tZONE,	HOUR(  6) },
-    { "t",	tZONE,	HOUR(  7) },
-    { "u",	tZONE,	HOUR(  8) },
-    { "v",	tZONE,	HOUR(  9) },
-    { "w",	tZONE,	HOUR( 10) },
-    { "x",	tZONE,	HOUR( 11) },
-    { "y",	tZONE,	HOUR( 12) },
-    { "z",	tZONE,	HOUR( 0) },
+    { "a",	tZONE,	-HOUR( 1) + HOUR(100) },
+    { "b",	tZONE,	-HOUR( 2) + HOUR(100) },
+    { "c",	tZONE,	-HOUR( 3) + HOUR(100) },
+    { "d",	tZONE,	-HOUR( 4) + HOUR(100) },
+    { "e",	tZONE,	-HOUR( 5) + HOUR(100) },
+    { "f",	tZONE,	-HOUR( 6) + HOUR(100) },
+    { "g",	tZONE,	-HOUR( 7) + HOUR(100) },
+    { "h",	tZONE,	-HOUR( 8) + HOUR(100) },
+    { "i",	tZONE,	-HOUR( 9) + HOUR(100) },
+    { "k",	tZONE,	-HOUR(10) + HOUR(100) },
+    { "l",	tZONE,	-HOUR(11) + HOUR(100) },
+    { "m",	tZONE,	-HOUR(12) + HOUR(100) },
+    { "n",	tZONE,	HOUR(  1) + HOUR(100) },
+    { "o",	tZONE,	HOUR(  2) + HOUR(100) },
+    { "p",	tZONE,	HOUR(  3) + HOUR(100) },
+    { "q",	tZONE,	HOUR(  4) + HOUR(100) },
+    { "r",	tZONE,	HOUR(  5) + HOUR(100) },
+    { "s",	tZONE,	HOUR(  6) + HOUR(100) },
+    { "t",	tZONE,	HOUR(  7) + HOUR(100) },
+    { "u",	tZONE,	HOUR(  8) + HOUR(100) },
+    { "v",	tZONE,	HOUR(  9) + HOUR(100) },
+    { "w",	tZONE,	HOUR( 10) + HOUR(100) },
+    { "x",	tZONE,	HOUR( 11) + HOUR(100) },
+    { "y",	tZONE,	HOUR( 12) + HOUR(100) },
+    { "z",	tZONE,	HOUR( 0)  + HOUR(100) },
     { NULL, 0, 0 }
 };
 
 /*
  * Dump error messages in the bit bucket.

Index: tests/clock.test
==================================================================
--- tests/clock.test
+++ tests/clock.test
@@ -35670,10 +35670,26 @@
 } "Oct 23, 1992 00:00:00"
 test clock-34.20 {clock scan, ISO 8601 point in time format} {
     set time [clock scan "1992-10-23T00:00:00"]
     clock format $time -format {%b %d, %Y %H:%M:%S}
 } "Oct 23, 1992 00:00:00"
+test clock-34.21 {clock scan, ISO 8601 invalid TZ} -body {
+    set time [clock scan "19921023MST000000"]
+    clock format $time -format {%b %d, %Y %H:%M:%S}
+} -returnCodes error -match glob -result {unable to convert date-time string*}
+test clock-34.22 {clock scan, ISO 8601 invalid TZ} -body {
+    set time [clock scan "19921023M000000"]
+    clock format $time -format {%b %d, %Y %H:%M:%S}
+} -returnCodes error -match glob -result {unable to convert date-time string*}
+test clock-34.23 {clock scan, ISO 8601 invalid TZ} -body {
+    set time [clock scan "1992-10-23M00:00:00"]
+    clock format $time -format {%b %d, %Y %H:%M:%S}
+} -returnCodes error -match glob -result {unable to convert date-time string*}
+test clock-34.24 {clock scan, ISO 8601 invalid TZ} -body {
+    set time [clock scan "1992-10-23MST00:00:00"]
+    clock format $time -format {%b %d, %Y %H:%M:%S}
+} -returnCodes error -match glob -result {unable to convert date-time string*}
 
 # CLOCK SCAN REAL TESTS
 # We use 5am PST, 31-12-1999 as the base for these scans because irrespective
 # of your local timezone it should always give us times on December 31, 1999
 set 5amPST 946645200

