This might fix issues where mysql isn't using UTC
There appears to be an issue when UTC isn't the native time for the MySQL server so instead of using NOW() which is the servers date/time use utc_timestamp instead. this means all interfaces MUST set time stamps as UTC.
这个提交包含在:
父节点
2c0f009aa8
当前提交
8c2b073bf9
共有 1 个文件被更改,包括 1 次插入 和 1 次删除
|
|
@ -85,7 +85,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function recent_status() {
|
function recent_status() {
|
||||||
$this->db->where("timestamp > date_sub(now(), interval 15 minute)", NULL, FALSE);
|
$this->db->where("timestamp > date_sub(UTC_TIMESTAMP(), interval 15 minute)", NULL, FALSE);
|
||||||
|
|
||||||
$query = $this->db->get('cat');
|
$query = $this->db->get('cat');
|
||||||
return $query;
|
return $query;
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用