Merge pull request #880 from JWhy/patch-1

Support other local date format for timezone detection to avoid startup errors
This commit is contained in:
brandon15811 2013-10-20 21:55:48 -07:00
commit 70ec644658

View File

@ -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);