summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcube_mdb2.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-05-09 21:20:08 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-05-09 21:20:08 +0000
commite1ae72f14cf75aa44f81481024f511aee37d3aa0 (patch)
treec605fc415272140df6c9e34c8e0d82eabae30980 /roundcubemail/program/include/rcube_mdb2.php
parentf5b83d7458407c822830dc2e75be8bd78e61893e (diff)
Rely on mysql server timezone not on PHP
git-svn-id: https://svn.roundcube.net/trunk@4746 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_mdb2.php')
-rw-r--r--roundcubemail/program/include/rcube_mdb2.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_mdb2.php b/roundcubemail/program/include/rcube_mdb2.php
index b25938bf8..365832806 100644
--- a/roundcubemail/program/include/rcube_mdb2.php
+++ b/roundcubemail/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);
+ }
}