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