diff --git a/src/main/java/tigase/archive/db/JDBCMessageArchiveRepository.java b/src/main/java/tigase/archive/db/JDBCMessageArchiveRepository.java index cb1d622..0999c7e 100644 --- a/src/main/java/tigase/archive/db/JDBCMessageArchiveRepository.java +++ b/src/main/java/tigase/archive/db/JDBCMessageArchiveRepository.java @@ -402,7 +402,7 @@ protected int setQueryParams(PreparedStatement stmt, Q crit, FasteningCollation stmt.setObject(i++, null); } if (crit.getStart() != null) { - if (data_repo.getDatabaseType() == DataRepository.dbTypes.mysql && crit.getStart().getTime() == 0) { + if (data_repo.getDatabaseType() == DataRepository.dbTypes.mysql && crit.getStart().getTime() <= 0) { stmt.setObject(i++, null); } else { data_repo.setTimestamp(stmt, i++, convertToTimestamp(crit.getStart())); @@ -411,7 +411,7 @@ protected int setQueryParams(PreparedStatement stmt, Q crit, FasteningCollation stmt.setObject(i++, null); } if (crit.getEnd() != null) { - if (data_repo.getDatabaseType() == DataRepository.dbTypes.mysql && crit.getEnd().getTime() == 0) { + if (data_repo.getDatabaseType() == DataRepository.dbTypes.mysql && crit.getEnd().getTime() <= 0) { stmt.setObject(i++, null); } else { data_repo.setTimestamp(stmt, i++, convertToTimestamp(crit.getEnd()));