diff --git a/version.inc.php b/version.inc.php index 0ba6e55..884f299 100644 --- a/version.inc.php +++ b/version.inc.php @@ -86,3 +86,12 @@ function get_inc_game_version() 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); +} \ No newline at end of file