refactor: Updated validate.php to only warn users the install is out of date if > 24 hours (#7208)

* refactor: Updated validate.php to only warn users the install is out of date if > 24 hours

* Fix 24hrs, not 48hrs
This commit is contained in:
Neil Lathwood
2017-08-24 06:28:59 +01:00
committed by GitHub
parent 30c1b79b3d
commit f2c69f35d0

View File

@@ -298,7 +298,9 @@ if (isset($config['rrdtool_version']) && (version_compare($config['rrdtool_versi
if (check_git_exists() === true) {
if ($config['update_channel'] == 'master' && $versions['local_sha'] != $versions['github']['sha']) {
$commit_date = new DateTime('@'.$versions['local_date'], new DateTimeZone(date_default_timezone_get()));
print_warn("Your install is out of date, last update: " . $commit_date->format('r'));
if ($commit_date->diff(new DateTime())->days > 0) {
print_warn("Your install is over 24 hours out of date, last update: " . $commit_date->format('r'));
}
}
if ($versions['local_branch'] != 'master') {