Moodle

Database date field does not allow entering date before 1970

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.6, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.7, 1.7.1
  • Fix Version/s: None
  • Labels:
    None
  • Affected Branches:
    MOODLE_16_STABLE, MOODLE_17_STABLE

Description

Currently Data Field created in teh databases allow only years from 1970 to 2020.
While in most cases the year before 1970 or after 2020 aren't used, there could be situations where it is needed to enter a wider (or even narrower) range of year.

A very good improvement would be allowing teacher to set the year date range that would appear in the year drop down boxes when a Date Field is created: in such a way the year range could be both set for narrower or wider needs.

Issue Links

Activity

Hide
Eric Merrill added a comment -

Because the date field in represented by unix timestamp, the current limits, without modifying the way the data is represented, are Dec 13 1901 (-2147483648) to Jan 18 2038 (2147483647) using the signed 32bit int that is currently used by php.

Show
Eric Merrill added a comment - Because the date field in represented by unix timestamp, the current limits, without modifying the way the data is represented, are Dec 13 1901 (-2147483648) to Jan 18 2038 (2147483647) using the signed 32bit int that is currently used by php.

People

Vote (3)
Watch (4)

Dates

  • Created:
    Updated: