diff -uNr moodle.orig/lib/moodlelib.php moodle/lib/moodlelib.php
--- moodle.orig/lib/moodlelib.php	2008-02-19 02:15:59.000000000 +0000
+++ moodle/lib/moodlelib.php	2008-03-10 19:26:32.000000000 +0000
@@ -1001,6 +1001,15 @@
         $format = get_string('strftimedaydatetime');
     }
 
+// MDL-7645:  There are a lot of locales where ante meridian/post meridian (AM/PM in the C locale)
+// are set to a blank string, let's have a default to avoid problems with multi-lingual definitions
+    if (strftime("%p",$date) == '') {
+        $currentLocale = setlocale(LC_TIME, 0);
+        setlocale(LC_TIME,'C');
+        $format = ereg_replace('%p', strftime("%p",$date), $format);
+        setlocale(LC_TIME,$currentLocale);
+    }
+
     if (!empty($CFG->nofixday)) {  // Config.php can force %d not to be fixed.
         $fixday = false;
     } else if ($fixday) {
