summaryrefslogtreecommitdiff
path: root/program/include/rcube_mdb2.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-05-09 21:20:08 +0000
committerthomascube <thomas@roundcube.net>2011-05-09 21:20:08 +0000
commitfd540bad79750b20da7db7680f504ef1dc860b38 (patch)
tree269af06c0e4411b4ce825f4b28e604f85a54e596 /program/include/rcube_mdb2.php
parentc739c713513f5ef1aec44249108edf07f588c248 (diff)
Rely on mysql server timezone not on PHP
Diffstat (limited to 'program/include/rcube_mdb2.php')
-rw-r--r--program/include/rcube_mdb2.php7
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);
+ }
}