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

tests: test_cron_delete_from_temp fails due to DST issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.7.2, 2.8
    • Unit tests
    • None
    • MOODLE_27_STABLE, MOODLE_28_STABLE

      The cron task file_temp_cleanup_task checks for files older than 1 week using the relative strtotime('-1 week') method which will account for DST changes.

      However, the unit tests for this function determine a week ago using hardcoded 7*24*60*60 instead - which does NOT account for DST. Both of these need to be calculating a week ago in the same way, otherwise for the week following a DST change like we just had this past weekend, the test will fail.

            Unassigned Unassigned
            aolley Adam Olley
            Votes:
            0 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.