]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-4421 unwanted space in formatted time; merged from MOODLE_18_STABLE
authorskodak <skodak>
Mon, 16 Apr 2007 18:51:52 +0000 (18:51 +0000)
committerskodak <skodak>
Mon, 16 Apr 2007 18:51:52 +0000 (18:51 +0000)
lib/moodlelib.php

index d5bc8dc5374cbd367f2b3ffe53de4c71cab58e01..4cb346d8f07fa51657cbb7a04d86b5b70cc54d69 100644 (file)
@@ -966,10 +966,10 @@ function make_timestamp($year, $month=1, $day=1, $hour=0, $minute=0, $second=0,
     if ($mins)  $omins  = $mins .' '. $sm;
     if ($secs)  $osecs  = $secs .' '. $ss;
 
-    if ($years)  return $oyears .' '. $odays;
-    if ($days)  return $odays .' '. $ohours;
-    if ($hours) return $ohours .' '. $omins;
-    if ($mins)  return $omins .' '. $osecs;
+    if ($years) return trim($oyears .' '. $odays);
+    if ($days)  return trim($odays .' '. $ohours);
+    if ($hours) return trim($ohours .' '. $omins);
+    if ($mins)  return trim($omins .' '. $osecs);
     if ($secs)  return $osecs;
     return get_string('now');
 }