diff --git a/js/ui/panel.js b/js/ui/panel.js
index 1a989fe..918877a 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -553,15 +553,23 @@ Panel.prototype = {
             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";
-	if (isTime24h) {
-	  /* Translators: This is the time format used in 24-hour mode. */
-	  this._clock.set_text(displayDate.toLocaleFormat(_("%a %R")));
-	} else {
-	  /* Translators: This is a time format used for AM/PM. */
-	  this._clock.set_text(displayDate.toLocaleFormat(_("%a %l:%M %p")));
-	}
+
+        let gconf = Shell.GConf.get_default();
+        let time_format = gconf.get_string("custom_time_format");
+        if (time_format) {
+          this._clock.set_text(displayDate.toLocaleFormat(time_format));
+        }
+        else if (isTime24h) {
+	        /* If there is no am or pm, time format is 24h */
+	        let isTime24h = displayDate.toLocaleFormat("x%p") == "x";
+	        if (isTime24h) {
+	          /* Translators: This is the time format used in 24-hour mode. */
+	          this._clock.set_text(displayDate.toLocaleFormat(_("%a %R")));
+	        } else {
+	          /* Translators: This is a time format used for AM/PM. */
+	          this._clock.set_text(displayDate.toLocaleFormat(_("%a %l:%M %p")));
+	        }
+        }
         Mainloop.timeout_add(msecRemaining, Lang.bind(this, this._updateClock));
         return false;
     },
