Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-9019

Hard-coded 12-hour notation for rendering file modification times in course files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 1.6, 1.7, 1.8
    • Course
    • None
    • Linux, Apache 2.2.3, MySQL 5.0.27, PHP 5.1.6, Moodle 1.6.3+
    • MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE

      The modification time of files listed in the course Files area is now displayed using the 12-hour notation but the a.m./p.m. part is missing in other languages than English (I tested cs_utf8, de_utf8, fr_utf8, sv_utf8). I think using the 24-hour notation would be safer. What I did was this:

      ==================================================================
      ---files/index.php (revision 333)
      +++ files/index.php (revision 334)
      @@ -738,5 +738,5 @@
      $filesafe = rawurlencode($dir);
      $filesize = display_size(get_directory_size("$fullpath/$dir"));

      • $filedate = userdate(filemtime($filename), "%d %b %Y, %I:%M %p");
        + $filedate = userdate(filemtime($filename), "%d %b %Y, %H:%M");
        print_cell("center", "<input type=\"checkbox\" name=\"file$count\" value=\"$fileurl\" />", 'checkbox');
        print_cell("left", "<a href=\"index.php?id=$id&wdir=$fileurl&choose=$choose\"><img src=\"$CFG->pixpath/f/folder.gif\" height=\"16\" width=\"16\" border=\"0\" alt=\"Folder\" /></a> <a href=\"index.php?id=$id&wdir=$fileurl&choose=$choose\">".htmlspecialchars($dir)."</a>", 'name');
        @@ -762,5 +762,5 @@
        $filesafe = rawurlencode($file);
        $fileurlsafe = rawurlencode($fileurl);
      • $filedate = userdate(filemtime($filename), "%d %b %Y, %I:%M %p");
        + $filedate = userdate(filemtime($filename), "%d %b %Y, %H:%M");

      $selectfile = trim($fileurl, "/");

            poltawski Dan Poltawski
            mixik Daniel Miksik (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.