time format

Issue #39 new
Former user created an issue

Hello, can i change the time format to 24 mode

Comments (3)

  1. Chris

    Hello, its the time displaying when i click on a name of a student.

    In addition in excel the date in the cell Tuesday, 5 May 2020 1:35 PM is in text mode and doesn’t recognized as date to do some calculations.

  2. Aday Talavera

    You can change that output modifying this line in dedication.php

    userdate($row->start_date),

    userdate is a moodle function to format datetimes to the current user format.

    Instead of you could user php date function https://www.php.net/manual/en/function.date.php to format the date and the time.

    For example:

    date("Y-m-d H:i:s", $row->start_date),

    For the download excel part, you need to change in the same way dedication_lib.php in line 124.

    block_dedication_utils::format_dedication($row->dedicationtime),

    I will try to add support to alter this on demand if needed or add another column to the Excel file.

  3. Log in to comment