diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-05-10 07:08:03 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-05-10 07:08:03 +0000 |
| commit | 13ac5799561da0876736b85da28e7e440fc6fea0 (patch) | |
| tree | 4ebe95431bc5893e02d3807ee961e71c9dcbdf97 /roundcubemail/program/include/rcube_mdb2.php | |
| parent | e1ae72f14cf75aa44f81481024f511aee37d3aa0 (diff) | |
Revert r4746 due to timestsamp issues with mysql; deprecate rcube_mdb2::unixtimestamp()
git-svn-id: https://svn.roundcube.net/trunk@4747 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_mdb2.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_mdb2.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/roundcubemail/program/include/rcube_mdb2.php b/roundcubemail/program/include/rcube_mdb2.php index 365832806..a68d1dd92 100644 --- a/roundcubemail/program/include/rcube_mdb2.php +++ b/roundcubemail/program/include/rcube_mdb2.php @@ -545,9 +545,12 @@ class rcube_mdb2 /** * Return SQL statement to convert a field value into a unix timestamp * + * This method is deprecated and should not be used anymore due to limitations + * of timestamp functions in Mysql (year 2038 problem) + * * @param string $field Field name * @return string SQL statement to use in query - * @access public + * @deprecated */ function unixtimestamp($field) { @@ -574,12 +577,7 @@ class rcube_mdb2 */ function fromunixtime($timestamp) { - switch ($this->db_provider) { - case 'mysql': - return 'FROM_UNIXTIME(' . intval($timestamp) . ')'; - default: - return date("'Y-m-d H:i:s'", $timestamp); - } + return date("'Y-m-d H:i:s'", $timestamp); } |
