diff options
Diffstat (limited to 'program/include/rcube_mdb2.php')
-rw-r--r-- | program/include/rcube_mdb2.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/program/include/rcube_mdb2.php b/program/include/rcube_mdb2.php index b25938bf8..365832806 100644 --- a/program/include/rcube_mdb2.php +++ b/program/include/rcube_mdb2.php @@ -574,7 +574,12 @@ class rcube_mdb2 */ 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); + } } |