diff options
author | thomascube <thomas@roundcube.net> | 2005-12-03 16:54:12 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2005-12-03 16:54:12 +0000 |
commit | 1cded85790206afe084e1baff371c543711b2b18 (patch) | |
tree | b050fb89707e048df5f30f500faad792962a1e81 /program/include/rcube_mdb2.inc | |
parent | 5bc8cb662fc3bcda9aa641b7a5e88c0b81dd63d6 (diff) |
Re-design of caching (new database table added\!); some bugfixes; Postgres support
Diffstat (limited to 'program/include/rcube_mdb2.inc')
-rwxr-xr-x | program/include/rcube_mdb2.inc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/program/include/rcube_mdb2.inc b/program/include/rcube_mdb2.inc index 35973ad5d..54a40e796 100755 --- a/program/include/rcube_mdb2.inc +++ b/program/include/rcube_mdb2.inc @@ -238,6 +238,22 @@ class rcube_db } + function format_date($timestamp) + { + switch($this->db_provider) + { + case 'mysqli': + case 'mysql': + return "FROM_UNIXTIME($timestamp)"; + break; + case 'sqlite': + return "datetime('$timestamp')"; + break; + default: + return date("Y-m-d H:i:s", $timestamp); + } + } + function _add_result($res, $query) { // sql error occured |