We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 54f7154d authored by Brion Vibber's avatar Brion Vibber

Fix for ticket #3020: set MySQL session time_zone variable to UTC ('+0:00') so...

Fix for ticket #3020: set MySQL session time_zone variable to UTC ('+0:00') so TIMESTAMP column values are comparable against our other UTC timestamp values.

MySQL stores TIMESTAMP columns as UTC, but with a local time interface. (SRSLY?!) DATETIME columns are always bare and assumed to be local time, but we keep only UTC in them.
Forcing the session time_zone to UTC means we won't have to worry as much about what we're sending/receiving in there.

Also will let us remove the hack in master commit a7abb232 for session tweaks
parent 5b8e74f8
......@@ -480,6 +480,10 @@ class Memcached_DataObject extends Safe_DataObject
}
}
}
// Needed to make timestamp values usefully comparable.
if (common_config('db', 'type') == 'mysql') {
parent::_query("set time_zone='+0:00'");
}
}
return $result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment