Fixed time checking on Linux

This commit is contained in:
Shoghi Cervantes 2013-06-02 13:32:36 +02:00
parent 91e414fb87
commit c7a3fc4931

View File

@ -37,8 +37,8 @@ if(strpos(" ".strtoupper(php_uname("s")), " WIN") !== false){
$j = array_map("intval", explode("/", trim($date[0]))); $j = array_map("intval", explode("/", trim($date[0])));
$offset = round((mktime($i[0], $i[1], 0, $j[1], $j[0], $j[2]) - $time) / 60) * 60; $offset = round((mktime($i[0], $i[1], 0, $j[1], $j[0], $j[2]) - $time) / 60) * 60;
}else{ }else{
exec("date +%s", trim($t[0])); exec("date +%s", $t);
$offset = round((intval($t) - time()) / 60) * 60; $offset = round((intval(trim($t[0])) - time()) / 60) * 60;
} }
$daylight = (int) date("I"); $daylight = (int) date("I");