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

Year 2038 problem manifests in date availability condition

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.10, 3.6.8, 3.7.4, 3.8.1
    • Fix Version/s: None
    • Component/s: Conditional activities
    • Labels:
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE

      Description

      Someone forced the Year 2038 problem to surface.

      When choosing an availability date after the eponymous January 19th, 2038, Moodle reports a bug because the timestamp is now of datatype double, not of integer.

      See: https://github.com/moodle/moodle/blob/77d1c415025f99f1c36dae67aac7af11b8a34b50/availability/condition/date/classes/condition.php#L68

      I haven't checked where else timestamps are checked against is_int().

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            poggenpohlda Daniel Poggenpohl
            Participants:
            Component watchers:
            Sam Marshall, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated: