mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 19:28:55 +00:00
Calculate time offset only if date.timezone is not set
This commit is contained in:
parent
b7c0e08b7d
commit
8a9dcbb646
@ -21,6 +21,7 @@
|
||||
|
||||
set_time_limit(0);
|
||||
|
||||
if(ini_get("date.timezone") == ""){ //No Timezone set
|
||||
date_default_timezone_set("GMT");
|
||||
if(strpos(" ".strtoupper(php_uname("s")), " WIN") !== false){
|
||||
$time = time();
|
||||
@ -40,6 +41,7 @@ if(strpos(" ".strtoupper(php_uname("s")), " WIN") !== false){
|
||||
$daylight = (int) date("I");
|
||||
|
||||
date_default_timezone_set(timezone_name_from_abbr("", $offset, $daylight));
|
||||
}
|
||||
|
||||
gc_enable();
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
|
Loading…
x
Reference in New Issue
Block a user