From a860f16f4a7cb94be29e6c445bc9684d222bbdac Mon Sep 17 00:00:00 2001 From: JWhy Date: Mon, 21 Oct 2013 06:12:27 +0200 Subject: [PATCH] Support other local date format for timezone detection to avoid startup errors fixes PocketMine/PocketMine-MP#718 --- src/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.php b/src/config.php index b88982155..9afff1e91 100644 --- a/src/config.php +++ b/src/config.php @@ -28,7 +28,7 @@ if(strpos(" ".strtoupper(php_uname("s")), " WIN") !== false){ exec("time.exe /T", $hour); $i = array_map("intval", explode(":", trim($hour[0]))); exec("date.exe /T", $date); - $j = array_map("intval", explode("/", 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; }else{ exec("date +%s", $t);