workaround to mak sure that minTimeSecs and maxTimeSecs have values

This commit is contained in:
Isaac Connor 2017-09-21 16:42:22 -04:00
parent 9eb489288a
commit c3930bb2ab
1 changed files with 5 additions and 0 deletions

View File

@ -474,6 +474,11 @@ foreach ($monitors as $m)
$numMonitors += 1;
}
echo "var numMonitors = $numMonitors;\n";
if ( ! $minTimeSecs )
$minTimeSecs = strtotime("2036-01-01 01:01:01");
if ( ! $maxTimeSecs )
$maxTimeSecs = strtotime("1950-01-01 01:01:01");
echo "var minTimeSecs=" . $minTimeSecs . ";\n";
echo "var maxTimeSecs=" . $maxTimeSecs . ";\n";
echo "var rangeTimeSecs=" . ( $maxTimeSecs - $minTimeSecs + 1) . ";\n";