fix task for get version lifetime on windows
This commit is contained in:
parent
32a4dd5157
commit
f2838a3cfe
|
@ -90,9 +90,11 @@ function get_version_file_lifetime()
|
|||
{
|
||||
global $GAME_ROOT;
|
||||
|
||||
exec("git log --follow --format=%ad --date=format:'%Y-%m-%d %H:%M:%S' " . $GAME_ROOT . "/VERSION" , $out, $ret);
|
||||
exec("git log --follow --format=%ad --date=format:\"%Y-%m-%d %H:%M:%S\" " . $GAME_ROOT . "/VERSION" , $out, $ret);
|
||||
|
||||
if($ret != 0)
|
||||
throw new Exception("git error");
|
||||
throw new Exception("Can't get date from git.");
|
||||
|
||||
$minutes = (time() - strtotime($out[0])) / 60;
|
||||
|
||||
return ceil($minutes);
|
||||
|
|
Loading…
Reference in New Issue