Validate schema in utc (#13182)

if timestamp is off, prepend sql query to set UTC for session
This commit is contained in:
Tony Murray
2021-08-30 11:02:48 -05:00
committed by GitHub
parent 9a635232dc
commit e81ee98b31
2 changed files with 7 additions and 0 deletions

View File

@@ -319,6 +319,11 @@ class Database extends BaseValidation
$schema_update[] = $this->dropTableSql($table);
}
// set utc timezone if timestamp issues
if (preg_grep('/\d{4}-\d\d-\d\d \d\d:\d\d:\d\d/', $schema_update)) {
array_unshift($schema_update, "SET TIME_ZONE='+00:00';");
}
if (empty($schema_update)) {
$validator->ok('Database schema correct');
} else {