--- moodlelib.php.orig	2006-10-09 14:57:09.000000000 +0100
+++ moodlelib.php	2006-11-20 14:04:48.000000000 +0000
@@ -915,6 +915,15 @@
         $format = $strftimedaydatetime;
     }
 
+// paulo.matos:  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) {
