### Eclipse Workspace Patch 1.0
#P 19stable
Index: lib/moodlelib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/moodlelib.php,v
retrieving revision 1.960.2.85
diff -u -r1.960.2.85 moodlelib.php
--- lib/moodlelib.php	31 Jul 2008 07:35:59 -0000	1.960.2.85
+++ lib/moodlelib.php	3 Aug 2008 21:57:28 -0000
@@ -1184,6 +1184,14 @@
 function userdate($date, $format='', $timezone=99, $fixday = true) {
 
     global $CFG;
+    
+    if (preg_match('/%p/', $format)) { //partial fix for MDL-14149 to ensure am/pm show
+        $ampm = strftime('%p', $date);
+        if ($ampm == '') {
+            $ampm = date('a',$date);
+        }
+        $format = preg_replace('/%p/', $ampm, $format);
+    }
 
     $strtimezone = NULL;
     if (!is_numeric($timezone)) {

