diff --git a/pom.xml b/pom.xml
index 1a5e3b4..1e59fd6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.github.tennaito
rsql-jpa
- 2.0.6-SNAPSHOT
+ 2.0.7-SNAPSHOT
jar
@@ -52,7 +52,7 @@
2.0.0
-
+
org.eclipse.persistence
javax.persistence
diff --git a/src/main/java/com/github/tennaito/rsql/jpa/PredicateBuilder.java b/src/main/java/com/github/tennaito/rsql/jpa/PredicateBuilder.java
index 8bbf0de..468e724 100755
--- a/src/main/java/com/github/tennaito/rsql/jpa/PredicateBuilder.java
+++ b/src/main/java/com/github/tennaito/rsql/jpa/PredicateBuilder.java
@@ -68,8 +68,19 @@ public final class PredicateBuilder {
public static final Character LIKE_WILDCARD = '*';
- private static final Date START_DATE = new Date(0L) ;
- private static final Date END_DATE = new Date(99999999999999999L) ;
+ private static final Date START_DATE;
+ private static final Date END_DATE;
+
+ static {
+ //
+ // Use a date range that Oracle can cope with - apparently the years around 1 BC and 1 AD are messed up in Oracle - known bug
+ //
+ Calendar cal = Calendar.getInstance();
+ cal.set( 9999, Calendar.DECEMBER, 31);
+ END_DATE = cal.getTime();
+ cal.set( 5, Calendar.JANUARY, 1); // Use Jan 1, 5 AD, since that's where the Roman's sort of got it together with leap years.
+ START_DATE = cal.getTime();
+ }
/**
* Private constructor.