--- panel.js.bak	2010-02-26 17:21:17.000000000 +0200
+++ panel.js	2010-02-26 17:30:34.000000000 +0200
@@ -553,8 +553,9 @@
             displayDate.setMinutes(displayDate.getMinutes() + 1);
             msecRemaining += 60000;
         }
-	/* If there is no am or pm, time format is 24h */
-	let isTime24h = displayDate.toLocaleFormat("x%p") == "x";
+        // we check whether the current locale thinks 5pm starts with 17
+        let fivepm= new Date(1267026359524);
+        let isTime24h = (fivepm.toLocaleFormat("%X").substr(0,2) == "17");
 	if (isTime24h) {
 	  /* Translators: This is the time format used in 24-hour mode. */
 	  this._clock.set_text(displayDate.toLocaleFormat(_("%a %R")));
