Don't add trivial timezone records in the db, we 're going to handle them manually.

This commit is contained in:
defacer
2005-04-08 19:34:19 +00:00
parent 97e28cc66d
commit ffc141e4be
-16
View File
@@ -26,22 +26,6 @@ $ddd = olson_todst($CFG->dataroot.'/temp/olson.txt');
execute_sql('TRUNCATE TABLE '.$CFG->prefix.'timezone');
$timezone = new stdClass;
$timezone->year = 1970;
for($i = -13; $i <= 13; $i += .5) {
$timezone->gmtoff = $i * HOURSECS;
$timezone->name = get_string('timezoneunspecifiedlocation').' / GMT';
$timezone->sortkey = 'UNSPECIFIED_'.sprintf('%05d', 13 * HOURSECS + $timezone->gmtoff);
if($i < 0) {
$timezone->name .= $i;
}
else if($i > 0) {
$timezone->name .= '+'.$i;
}
insert_record('timezone', $timezone);
}
foreach($ddd as $rec) {
print_object($rec);
insert_record('timezone', $rec);