summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortill <till@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-02-03 16:13:33 +0000
committertill <till@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-02-03 16:13:33 +0000
commit03c5a8940ee8ed64e0a8fc608049d6dcd2f12837 (patch)
tree7eaf939b5176b7293850c8185641d306acd0163f
parent86c3a09a7ac60a2bb98c09b8e876b4d5eddcbe5b (diff)
* fixed retrieval of timestamp from db
git-svn-id: https://svn.roundcube.net/trunk@1009 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/check.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/roundcubemail/check.php b/roundcubemail/check.php
index 685ee40ea..c87b8be1f 100644
--- a/roundcubemail/check.php
+++ b/roundcubemail/check.php
@@ -105,8 +105,13 @@ if ($db_working === true) {
$DB = new rcube_mdb2($rcmail_config['db_dsnw'], '', false);
$DB->db_connect('w');
- $tz_db = $DB->unixtimestamp($DB->now());
- $tz_local = time();
+ $tz_db = "SELECT " . $DB->unixtimestamp($DB->now()) . " AS tz_db";
+ $tz_db = $DB->query($tz_db);
+ $tz_db = $DB->fetch_assoc($tz_db);
+ $tz_db = (int) $tz_db['tz_db'];
+ $tz_local = (int) time();
+ $tz_diff = $tz_local - $tz_db;
+
if ($tz_db != $tz_local) {
echo 'NOT OK';
} else {
@@ -158,4 +163,4 @@ if (empty($save_path)) {
}
echo '<br />';
*/
-?> \ No newline at end of file
+?>