-
New Feature
-
Resolution: Fixed
-
Critical
-
2.8
-
MOODLE_28_STABLE
-
MOODLE_29_STABLE
-
wip_
MDL-49684_m29_tz2 -
Moodle timezone stuff is buggy, unreliable and hard to use. Moreover it is incompatible with standard PHP date functions and classes.
Pretty much all places that use $CFG->timezone and $user->timezone directly (outside of admin settings and user profiles) are bugs at the moment, this patch introduces new core_date::get_system_timezone() and core_date::get_user_timezone($user = null) which return timezone name compatible both with Moodle legacy date functions and standard PHP code.
Backwards compatibility should be excellent both for data and existing code.
Remaining issues that are not solved by this patch:
- the badzone list could be expanded to cover all those strange Windows timezones and maybe some more abbreviations
- some parts of Moodle need to be properly cleaned up/rewritten to use PHP time intervals - stats, calendar, etc.
- 3rd party calendars need to be updated
- there should be some simple docs for developers
- there could be an environment check for outdated PHP timezones - if older than 1 year for example
Required documentation:
- developers - they need to understand the new core_date class and they need to use it always
- administrators should know that the built-in timezone data can be updated via pecl extension - see http://pecl.php.net/package/timezonedb
- caused a regression
-
MDL-49759 Updated developer docs for new time handling in Moodle
- Closed
- has a non-specific relationship to
-
MDL-49828 new timezones followup
- Closed
- has been marked as being related by
-
MDL-50704 Users UTC+/- timezone settings not migrated to new timezone format.
- Closed
- has to be done before
-
MDL-49801 Add environment check to verify that PHP pecl timezones are up-to-date
- Closed
- is duplicated by
-
MDL-22625 Constant warnings when timezone isn't set properly in php.ini or date_default_timezone_set
- Closed
-
MDL-26391 Remove 'Server default' option in the Moodle settings
- Closed
-
MDL-7272 Remove custom timezone handling when PHP5 is required
- Closed
-
MDL-48603 Calendar Import does not recognise most of Windows timezones
- Closed
-
MDL-22465 Timezones aren't installed to Moodle on initial install
- Closed
- Testing discovered
-
MDL-49797 iCal feed fails to import when empty calendar title
- Closed
- will help resolve
-
MDL-22625 Constant warnings when timezone isn't set properly in php.ini or date_default_timezone_set
- Closed
-
MDL-48915 Add support for reseting timezone as part of the reset process between unit tests
- Open
-
MDL-26753 DST issues
- Closed
-
MDL-46239 Scheduled task manager does not properly handle timezones
- Closed
-
MDL-27158 Default timezone is incorrect when not set in PHP configuration
- Closed
-
MDL-41709 Date handling can't cope with UTC higher than 12 eg UTC +14 (Pacific/Kiritimati)
- Closed
-
MDL-44569 DST Activates Hours Early: Affects Assignment, Quiz, Calendar, etc.
- Closed
-
MDL-44680 Moodle calculates DST shift early in some cases
- Closed