diff --git a/functions/scripts/remove_offline_addresses.php b/functions/scripts/remove_offline_addresses.php
index d35a1835efcca18450b859775376b891479f6239..3d7dc19f423a8c2cbc4b78c3a5f77608ebf08bf9 100644
--- a/functions/scripts/remove_offline_addresses.php
+++ b/functions/scripts/remove_offline_addresses.php
@@ -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); }