Private GIT

Skip to content
Snippets Groups Projects
Unverified Commit 58a11ab5 authored by Andrey Zhdanov's avatar Andrey Zhdanov Committed by GitHub
Browse files

Fix Incorrect DATETIME value error (#3382)

By default, the lastSeen field of the ip address is set to '1970-01-01 00:00:01'.
In mysql 8.0, the script does not work correctly referring to the incorrect date format '0000-00-00 00:00:00'.
Specifying the date '0000-00-00 00:00:00' does not make sense.
parent 0d8813d0
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ $query = "select
and `su`.`pingSubnet` = 1
and (`ip`.`excludePing` IS NULL or `ip`.`excludePing`!=1 )
and
(`ip`.`lastSeen` < '$beforetime' and `ip`.`lastSeen` != '0000-00-00 00:00:00' and `ip`.`lastSeen` is not NULL);";
(`ip`.`lastSeen` < '$beforetime' and `ip`.`lastSeen` != '1970-01-01 00:00:01' and `ip`.`lastSeen` is not NULL);";
# fetch
try { $offline_addresses = $Database->getObjectsQuery($query); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment