added lifetime calculation for VERSION file
This commit is contained in:
parent
70cc1e5401
commit
5ffb3af991
|
@ -86,3 +86,12 @@ function get_inc_game_version()
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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" , $creating_timestamp);
|
||||||
|
$minutes = (time() - strtotime($creating_timestamp[0])) / 60;
|
||||||
|
|
||||||
|
return ceil($minutes);
|
||||||
|
}
|
Loading…
Reference in New Issue