commit 4bf336087462fc76dd2139208198643dfbb3f02d
Author: Florian Müllner <fmuellner@gnome.org>
Date:   Thu Apr 3 17:16:48 2014 +0200

    telepathyClient: Only use 12-hour format when supported by the locale
    
    It is a bit odd to request AM/PM format when the locale selected
    by LC_TIME lacks the concept. We ignore the format setting in that
    case elsewhere and assume 24-hour format, let's do the same for
    chat timestamps for consistency.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=728271

diff --git a/js/ui/components/telepathyClient.js b/js/ui/components/telepathyClient.js
index 6b62f30..523ecab 100644
--- a/js/ui/components/telepathyClient.js
+++ b/js/ui/components/telepathyClient.js
@@ -983,9 +983,9 @@ const ChatNotification = new Lang.Class({
 
         let desktopSettings = new Gio.Settings({ schema: 'org.gnome.desktop.interface' });
         let clockFormat = desktopSettings.get_string(CLOCK_FORMAT_KEY);
+        let hasAmPm = date.toLocaleFormat('%p') != '';
 
-        switch (clockFormat) {
-            case '24h':
+        if (clockFormat == '24h' || !hasAmPm) {
             // Show only the time if date is on today
             if(daysAgo < 1){
                 /* Translators: Time in 24h format */
@@ -1018,10 +1018,7 @@ const ChatNotification = new Lang.Class({
                 // xgettext:no-c-format
                 format = _("%B %d %Y, %H\u2236%M");
             }
-                break;
-        default:
-            /* explicit fall-through */
-            case '12h':
+        } else {
             // Show only the time if date is on today
             if(daysAgo < 1){
                 /* Translators: Time in 24h format */
@@ -1054,7 +1051,6 @@ const ChatNotification = new Lang.Class({
                 // xgettext:no-c-format
                 format = _("%B %d %Y, %l\u2236%M %p");
             }
-                break;
         }
         return date.toLocaleFormat(format);
     },
