From 62c13a2f3ea30d2f09726c0342923b057aede7df Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 19 Nov 2002 14:27:57 +0000 Subject: [PATCH] Changed all references of %e to %d to fix strftime on Windows --- course/lib.php | 8 ++++---- course/log.php | 2 +- course/loggraph.php | 2 +- course/weeks.php | 4 ++-- files/index.php | 4 ++-- lib/moodlelib.php | 2 +- mod/assignment/lib.php | 2 +- mod/forum/lib.php | 4 ++-- mod/journal/lib.php | 2 +- mod/survey/lib.php | 4 ++-- mod/survey/report.php | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/course/lib.php b/course/lib.php index 8ba515e5bb..c8171d634a 100644 --- a/course/lib.php +++ b/course/lib.php @@ -61,7 +61,7 @@ function print_log_selector_form($course, $selecteduser=0, $selecteddate="today" $timemidnight = $today = usergetmidnight($timenow); // Put today up the top of the list - $dates = array("$timemidnight" => get_string("today").", ".userdate($timenow, "%e %B %Y") ); + $dates = array("$timemidnight" => get_string("today").", ".userdate($timenow, "%d %B %Y") ); if (! $course->startdate) { $course->startdate = $course->timecreated; @@ -71,7 +71,7 @@ function print_log_selector_form($course, $selecteduser=0, $selecteddate="today" while ($timemidnight > $course->startdate and $numdates < 365) { $timemidnight = $timemidnight - 86400; $timenow = $timenow - 86400; - $dates["$timemidnight"] = userdate($timenow, "%A, %e %B %Y"); + $dates["$timemidnight"] = userdate($timenow, "%A, %d %B %Y"); $numdates++; } @@ -160,7 +160,7 @@ function print_log($course, $user=0, $date=0, $order="ORDER BY l.time ASC") { echo "course\">".$courses[$log->course].""; } echo "".userdate($log->time, "%A").""; - echo "".userdate($log->time, "%e %B %Y, %I:%M %p").""; + echo "".userdate($log->time, "%d %B %Y, %I:%M %p").""; echo ""; link_to_popup_window("$CFG->wwwroot/lib/ipatlas/plot.php?address=$log->ip&user=$log->user", "ipatlas","$log->ip", 400, 700); echo ""; @@ -287,7 +287,7 @@ function print_recent_activity($course) { } else { echo "

"; echo get_string("yourlastlogin").":
"; - echo userdate($USER->lastlogin, "%A, %e %b %Y, %H:%M"); + echo userdate($USER->lastlogin, "%A, %d %b %Y, %H:%M"); echo "

"; } diff --git a/course/log.php b/course/log.php index c925f164eb..bf7732f69d 100644 --- a/course/log.php +++ b/course/log.php @@ -39,7 +39,7 @@ $userinfo = "$u->firstname $u->lastname"; } if ($date) { - $dateinfo = userdate($date, "%A, %e %B %Y"); + $dateinfo = userdate($date, "%A, %d %B %Y"); } print_header("$course->shortname: $strlogs", "$course->fullname", diff --git a/course/loggraph.php b/course/loggraph.php index 7e48cd960d..8721272bd7 100644 --- a/course/loggraph.php +++ b/course/loggraph.php @@ -43,7 +43,7 @@ $i = 0; while ($timestart < $timenow) { $timefinish = $timestart + 86400; - $days[$i] = userdate($timestart, "%a %e %b"); + $days[$i] = userdate($timestart, "%a %d %b"); $logs[$i] = 0; $i++; $timestart = $timefinish; diff --git a/course/weeks.php b/course/weeks.php index 8f37ecc166..75de1af282 100644 --- a/course/weeks.php +++ b/course/weeks.php @@ -141,8 +141,8 @@ $thisweek = (($weekdate <= $timenow) && ($timenow < $nextweekdate)); - $weekday = userdate($weekdate, "%e %B"); - $endweekday = userdate($weekdate+518400, "%e %B"); + $weekday = userdate($weekdate, "%d %B"); + $endweekday = userdate($weekdate+518400, "%d %B"); if ($thisweek) { $highlightcolor = $THEME->cellheading2; diff --git a/files/index.php b/files/index.php index 8ceacdb083..4d612143dc 100644 --- a/files/index.php +++ b/files/index.php @@ -547,7 +547,7 @@ function displaydir ($wdir) { $filename = $fullpath."/".$dir; $fileurl = rawurlencode($wdir."/".$dir); $filesafe = rawurlencode($dir); - $filedate = userdate(filectime($filename), "%e %b %Y, %I:%M %p"); + $filedate = userdate(filectime($filename), "%d %b %Y, %I:%M %p"); echo ""; @@ -573,7 +573,7 @@ function displaydir ($wdir) { $fileurl = "$wdir/$file"; $filesafe = rawurlencode($file); $fileurlsafe = rawurlencode($fileurl); - $filedate = userdate(filectime($filename), "%e %b %Y, %I:%M %p"); + $filedate = userdate(filectime($filename), "%d %b %Y, %I:%M %p"); echo ""; diff --git a/lib/moodlelib.php b/lib/moodlelib.php index faf6b09966..6689751a87 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -527,7 +527,7 @@ function userdate($date, $format="", $timezone=99) { global $USER; if ($format == "") { - $format = "%A, %e %B %Y, %I:%M %p"; + $format = "%A, %d %B %Y, %I:%M %p"; } if ($timezone == 99) { if (isset($USER->timezone)) { diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php index 3b9f327e1e..21344919e5 100644 --- a/mod/assignment/lib.php +++ b/mod/assignment/lib.php @@ -206,7 +206,7 @@ function assignment_print_recent_activity(&$logs, $isteacher=false) { $content = true; print_headline(get_string("newsubmissions", "assignment").":"); foreach ($assignments as $assignment) { - $date = userdate($assignment->time, "%e %b, %H:%M"); + $date = userdate($assignment->time, "%d %b, %H:%M"); echo "

$date - $assignment->firstname $assignment->lastname
"; echo "\"wwwroot/mod/assignment/$assignment->url\">"; echo "$assignment->name"; diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 944339c8b0..afbfbf9b0c 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -349,7 +349,7 @@ function forum_print_recent_activity(&$logs, $isteacher=false) { $heading = true; $content = true; } - $date = userdate($post->modified, "%e %b, %H:%M"); + $date = userdate($post->modified, "%d %b, %H:%M"); echo "

$date - $post->firstname $post->lastname
"; echo "\"
wwwroot/mod/forum/$log->url\">"; if ($log->action == "add") { @@ -1315,7 +1315,7 @@ function forum_print_latest_discussions($forum_id=0, $forum_numdiscussions=5, $f $ownpost = ($discussion->userid == $USER->id); switch ($forum_style) { case "minimal": - echo "

".userdate($discussion->modified, "%e %b, %H:%M")." - $discussion->firstname"; + echo "

".userdate($discussion->modified, "%d %b, %H:%M")." - $discussion->firstname"; echo "
$discussion->subject "; echo "
wwwroot/mod/forum/discuss.php?d=$discussion->discussion\">"; echo get_string("more", "forum")."..."; diff --git a/mod/journal/lib.php b/mod/journal/lib.php index 44d64c914d..35ce8c7f6c 100644 --- a/mod/journal/lib.php +++ b/mod/journal/lib.php @@ -150,7 +150,7 @@ function journal_print_recent_activity(&$logs, $isteacher=false) { $content = true; print_headline(get_string("newjournalentries", "journal").":"); foreach ($journals as $journal) { - $date = userdate($journal->time, "%e %b, %H:%M"); + $date = userdate($journal->time, "%d %b, %H:%M"); echo "

$date - $journal->firstname $journal->lastname
"; echo "\"wwwroot/mod/journal/$journal->url\">"; echo "$journal->name"; diff --git a/mod/survey/lib.php b/mod/survey/lib.php index d166b4e0f2..9cbcd74c61 100644 --- a/mod/survey/lib.php +++ b/mod/survey/lib.php @@ -120,7 +120,7 @@ function survey_print_recent_activity(&$logs, $isteacher=false) { $content = true; print_headline(get_string("newsurveyresponses", "survey").":"); foreach ($surveys as $survey) { - $date = userdate($survey->time, "%e %b, %H:%M"); + $date = userdate($survey->time, "%d %b, %H:%M"); echo "

$date - $survey->firstname $survey->lastname
"; echo "\"
wwwroot/mod/survey/$survey->url\">"; echo "$survey->name"; @@ -167,7 +167,7 @@ function survey_print_all_responses($survey, $results) { echo ""; echo "id&id=$survey\">$a->firstname $a->lastname"; - echo "".userdate($a->time, "%e %B %Y, %I:%M %p").""; + echo "".userdate($a->time, "%d %B %Y, %I:%M %p").""; echo "$a->numanswers"; echo ""; } diff --git a/mod/survey/report.php b/mod/survey/report.php index 00cb98b2c2..57f1e87f4c 100644 --- a/mod/survey/report.php +++ b/mod/survey/report.php @@ -219,7 +219,7 @@ print_user_picture($a->user, $course->id, $a->picture, false); echo ""; echo "

user\">$a->firstname $a->lastname"; - echo "

".userdate($a->time, "%e %B %Y, %I:%M %p").""; + echo "

".userdate($a->time, "%d %B %Y, %I:%M %p").""; echo "cellcontent\">

"; if ($a->answer1) { echo "$a->answer1 - ".$answers[$a->answer1 - 1]; -- 2.39.5