mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-05 17:41:46 +00:00
Fixed #1152 get correct timezone from abbr.
This commit is contained in:
parent
bf6e759d97
commit
e4b475218b
@ -39,8 +39,16 @@ if(ini_get("date.timezone") == ""){ //No Timezone set
|
|||||||
}
|
}
|
||||||
|
|
||||||
$daylight = (int) date("I");
|
$daylight = (int) date("I");
|
||||||
|
$d = timezone_name_from_abbr("", $offset, $daylight);
|
||||||
date_default_timezone_set(timezone_name_from_abbr("", $offset, $daylight));
|
ini_set("date.timezone", $d)
|
||||||
|
date_default_timezone_set($d);
|
||||||
|
}else{
|
||||||
|
$d = @date_default_timezone_get();
|
||||||
|
if(strpos($d, "/") === false){
|
||||||
|
$d = timezone_name_from_abbr($d);
|
||||||
|
ini_set("date.timezone", $d)
|
||||||
|
date_default_timezone_set($d);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gc_enable();
|
gc_enable();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user