diff options
author | till <till@php.net> | 2008-02-03 16:13:33 +0000 |
---|---|---|
committer | till <till@php.net> | 2008-02-03 16:13:33 +0000 |
commit | be4d182b75da56b0de171726f95f78a97c764548 (patch) | |
tree | 96b8a6dd2a0cb2d8b9419794d112f90bc74c03e0 /check.php | |
parent | 703f80f2cfd08f3480724e10d1d123378afdec58 (diff) |
* fixed retrieval of timestamp from db
Diffstat (limited to 'check.php')
-rw-r--r-- | check.php | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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 +?> |