mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-23 18:24:25 +00:00
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.
This commit is contained in:
parent
6e194b81d6
commit
050182f2f5
@ -85,7 +85,7 @@
|
||||
|
||||
function recent_status() {
|
||||
$this->db->where('user_id', $this->session->userdata('user_id'));
|
||||
$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');
|
||||
return $query;
|
||||
|
Loading…
Reference in New Issue
Block a user