mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
Bringing in the mdl_timezone table.
DST is now kind of working, the next most important things to do are: 1. Get the import procedure working correctly and well, so we can populate it. 2. Provide a transparent migration procedure for all users to "Unknown location" timezones. 3. Banish $USER->timezone for good.
This commit is contained in:
parent
9870dbe5b6
commit
66336c5f34
@ -1230,6 +1230,29 @@ function main_upgrade($oldversion=0) {
|
||||
execute_sql('UPDATE `'.$CFG->prefix.'user` SET timezonename = \'\'');
|
||||
}
|
||||
|
||||
if ($oldversion < 2005032600) {
|
||||
execute_sql('DROP TABLE '.$CFG->prefix.'dst_preset', false);
|
||||
modify_database('',"CREATE TABLE `prefix_timezone` (
|
||||
`id` int(10) NOT NULL auto_increment,
|
||||
`name` varchar(100) NOT NULL default '',
|
||||
`year` int(11) NOT NULL default '0',
|
||||
`rule` varchar(20) NOT NULL default '',
|
||||
`gmtoff` int(11) NOT NULL default '0',
|
||||
`dstoff` int(11) NOT NULL default '0',
|
||||
`dst_month` tinyint(2) NOT NULL default '0',
|
||||
`dst_startday` tinyint(3) NOT NULL default '0',
|
||||
`dst_weekday` tinyint(3) NOT NULL default '0',
|
||||
`dst_skipweeks` tinyint(3) NOT NULL default '0',
|
||||
`dst_time` varchar(5) NOT NULL default '00:00',
|
||||
`std_month` tinyint(2) NOT NULL default '0',
|
||||
`std_startday` tinyint(3) NOT NULL default '0',
|
||||
`std_weekday` tinyint(3) NOT NULL default '0',
|
||||
`std_skipweeks` tinyint(3) NOT NULL default '0',
|
||||
`std_time` varchar(5) NOT NULL default '00:00',
|
||||
PRIMARY KEY (`id`)
|
||||
) TYPE=MyISAM COMMENT='Rules for calculating local wall clock time for users';");
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
@ -949,6 +949,28 @@ function main_upgrade($oldversion=0) {
|
||||
execute_sql('UPDATE `'.$CFG->prefix.'user` SET timezonename = \'\'');
|
||||
}
|
||||
|
||||
if ($oldversion < 2005032600) {
|
||||
execute_sql('DROP TABLE '.$CFG->prefix.'dst_preset', false);
|
||||
modify_database('',"CREATE TABLE prefix_timezone (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name varchar(100) NOT NULL default '',
|
||||
year integer NOT NULL default '0',
|
||||
rule varchar(20) NOT NULL default '',
|
||||
gmtoff integer NOT NULL default '0',
|
||||
dstoff integer NOT NULL default '0',
|
||||
dst_month integer NOT NULL default '0',
|
||||
dst_startday integer NOT NULL default '0',
|
||||
dst_weekday integer NOT NULL default '0',
|
||||
dst_skipweeks integer NOT NULL default '0',
|
||||
dst_time varchar(5) NOT NULL default '00:00',
|
||||
std_month integer NOT NULL default '0',
|
||||
std_startday integer NOT NULL default '0',
|
||||
std_weekday integer NOT NULL default '0',
|
||||
std_skipweeks integer NOT NULL default '0',
|
||||
std_time varchar(5) NOT NULL default '00:00'
|
||||
);");
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
// This is compared against the values stored in the database to determine
|
||||
// whether upgrades should be performed (see lib/db/*.php)
|
||||
|
||||
$version = 2005032300; // YYYYMMDD = date
|
||||
$version = 2005032600; // YYYYMMDD = date
|
||||
// XY = increments within a single day
|
||||
|
||||
$release = '1.5 UNSTABLE DEVELOPMENT'; // Human-friendly version name
|
||||
|
Loading…
x
Reference in New Issue
Block a user