Rely on mysql server timezone not on PHP

release-0.6
thomascube 14 years ago
parent c739c71351
commit fd540bad79

@ -574,7 +574,12 @@ class rcube_mdb2
*/ */
function fromunixtime($timestamp) function fromunixtime($timestamp)
{ {
return date("'Y-m-d H:i:s'", $timestamp); switch ($this->db_provider) {
case 'mysql':
return 'FROM_UNIXTIME(' . intval($timestamp) . ')';
default:
return date("'Y-m-d H:i:s'", $timestamp);
}
} }

Loading…
Cancel
Save