mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 05:34:54 +00:00
Fixed time checking on Linux
This commit is contained in:
parent
91e414fb87
commit
c7a3fc4931
@ -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");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user