function date_update_5205 in Date 6
Same name and namespace in other branches
- 5.2 date/date.install \date_update_5205()
File
- date/
date.install, line 304
Code
function date_update_5205() {
date_install_load();
$ret = array();
$fields = content_fields();
foreach ($fields as $field) {
if (strstr($field['type'], 'date')) {
$field_settings = unserialize(db_result(db_query("SELECT global_settings from {" . content_field_tablename() . "} where field_name = '%s'", $field['field_name'])));
foreach ($field_settings as $key => $value) {
if ($key == 'tz_handling' && $value == 'gmt') {
$field_settings[$key] = 'utc';
}
}
db_query("UPDATE {" . content_field_tablename() . "} SET global_settings = '%s' WHERE field_name = '%s'", serialize($field_settings), $field['field_name']);
}
}
return $ret;
}