summaryrefslogtreecommitdiff
path: root/program/include/rcube_mdb2.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-05-10 07:08:03 +0000
committerthomascube <thomas@roundcube.net>2011-05-10 07:08:03 +0000
commitff4ffc6d546d6d69bedd0018f8fbba40c867e468 (patch)
tree98cf491c46836c1cd9cc7cac41e99d8c762f1064 /program/include/rcube_mdb2.php
parentfd540bad79750b20da7db7680f504ef1dc860b38 (diff)
Revert r4746 due to timestsamp issues with mysql; deprecate rcube_mdb2::unixtimestamp()
Diffstat (limited to 'program/include/rcube_mdb2.php')
-rw-r--r--program/include/rcube_mdb2.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/program/include/rcube_mdb2.php b/program/include/rcube_mdb2.php
index 365832806..a68d1dd92 100644
--- a/program/include/rcube_mdb2.php
+++ b/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);
}