Changeset 1009 in subversion


Ignore:
Timestamp:
Feb 3, 2008 11:13:33 AM (5 years ago)
Author:
till
Message:
  • fixed retrieval of timestamp from db
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/check.php

    r1008 r1009  
    106106    $DB->db_connect('w'); 
    107107     
    108     $tz_db    = $DB->unixtimestamp($DB->now()); 
    109     $tz_local = time(); 
     108    $tz_db    = "SELECT " . $DB->unixtimestamp($DB->now()) . " AS tz_db"; 
     109    $tz_db    = $DB->query($tz_db); 
     110    $tz_db    = $DB->fetch_assoc($tz_db); 
     111    $tz_db    = (int) $tz_db['tz_db']; 
     112    $tz_local = (int) time(); 
     113    $tz_diff  = $tz_local - $tz_db; 
     114 
    110115    if ($tz_db != $tz_local) { 
    111116        echo 'NOT OK'; 
Note: See TracChangeset for help on using the changeset viewer.