Fixed $graceline to start of current day - $gracetime

This commit is contained in:
pezcurrel 2023-01-06 18:43:07 +01:00
parent ce539e520b
commit 85559ac1a4

View file

@ -26,9 +26,10 @@ $debug.='LOCALE: '.$locale.N;
// an instance is displayed as "New" if its age, relative to the InsertTS field, is less or equal than this (currently 31 days)
$oldline=30*24*60*60;
// an instance is considered dead if the last time it responded is before the graceline (see code below)
// an instance is considered dead if the last time it responded is before the graceline (see code below); we fix it at start of today - $gracetime
// $gracetime is defined in mustard/include/gracetime.php
$graceline=$bt-$gracetime;
$bti=round($bt);
$graceline=gmmktime(0,0,0,gmdate('n',$bti),gmdate('j',$bti),gmdate('Y',$bti))-$gracetime;
if (array_key_exists('id',$_GET) && preg_match('/^\d+$/',$_GET['id'])) {
$_GET['id']+=0;