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

tests: test_cron_delete_from_temp fails due to DST issue

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.7.2, 2.8
    • Fix Version/s: None
    • Component/s: Unit tests
    • Labels:
      None
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              aolley Adam Olley
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: