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

Form date selectors should not offer far-future dates

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.5.5
    • Fix Version/s: BACKEND
    • Component/s: Forms Library
    • Labels:
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_25_STABLE

      Description

      When used in 32-bit systems, Moodle should not present the option to select dates beyond 2038, the Unix 32-bit time limit. The last year shown in the dropdown should be 2037.

      We could do a PHP_INT_SIZE check but in fact I think this should probably be applied regardless of the system in use, because realistically nobody needs to set dates past 2037 anyway, and you'd get problems with backup/restore between 64 and 32 bit sites.

      This was highlighted by issues around MDL-44070 but it turned out that these dates didn't work properly with the old system either.

      (Note: Although the number of 32-bit Unix systems is decreasing, PHP on Windows is always affected by this restriction at present, even on 64-bit.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              quen Sam Marshall
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: