mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-18 01:14:10 +00:00
Hide timezone guess errors
This commit is contained in:
parent
eff454d103
commit
86d423ae4d
@ -118,13 +118,13 @@ namespace pocketmine {
|
|||||||
$time -= $time % 60;
|
$time -= $time % 60;
|
||||||
//TODO: Parse different time & date formats by region. ¬¬ world
|
//TODO: Parse different time & date formats by region. ¬¬ world
|
||||||
//Example: USA
|
//Example: USA
|
||||||
exec("time.exe /T", $hour);
|
@exec("time.exe /T", $hour);
|
||||||
$i = array_map("intval", explode(":", trim($hour[0])));
|
$i = array_map("intval", explode(":", trim($hour[0])));
|
||||||
exec("date.exe /T", $date);
|
@exec("date.exe /T", $date);
|
||||||
$j = array_map("intval", explode(substr($date[0], 2, 1), trim($date[0])));
|
$j = array_map("intval", explode(substr($date[0], 2, 1), 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", $t);
|
@exec("date +%s", $t);
|
||||||
$offset = round((intval(trim($t[0])) - time()) / 60) * 60;
|
$offset = round((intval(trim($t[0])) - time()) / 60) * 60;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user