Add date reference
diff --git a/tck/src/main/java/com/sun/ts/tests/el/common/util/TestNum.java b/tck/src/main/java/com/sun/ts/tests/el/common/util/TestNum.java
index d543869..8d018ab 100644
--- a/tck/src/main/java/com/sun/ts/tests/el/common/util/TestNum.java
+++ b/tck/src/main/java/com/sun/ts/tests/el/common/util/TestNum.java
@@ -18,7 +18,12 @@
import java.math.BigDecimal;
import java.math.BigInteger;
+import java.time.Clock;
+import java.time.Instant;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
import java.util.ArrayList;
+import java.util.Date;
/**
* Used to store lists that will be utilized across the board for a common
@@ -28,6 +33,10 @@
private static final String NUMBER_REFERENCE = "1";
+ public static final Instant DATE_REFERENCE_BEFORE = Instant.parse("2025-04-03T02:00:59.00Z");
+ public static final Instant DATE_REFERENCE = Instant.parse("2025-04-03T02:01:00.00Z");
+ public static final Instant DATE_REFERENCE_AFTER = Instant.parse("2025-04-03T02:01:01.00Z");
+
/**
* Private as this class will only have static methods and members.
*/
@@ -77,4 +86,21 @@
return numberList;
}
+
+
+ /**
+ * Used to provide a list of date and times using different implementations
+ * that all refer to 2025-04-03 02:01 UTC.
+ */
+ public static ArrayList<Object> getDateTimeList() {
+
+ ArrayList<Object> dateTimeList = new ArrayList<>();
+
+ dateTimeList.add(Date.from(DATE_REFERENCE));
+ dateTimeList.add(Clock.fixed(DATE_REFERENCE, ZoneId.of("Z")));
+ dateTimeList.add(DATE_REFERENCE);
+ dateTimeList.add(ZonedDateTime.ofInstant(DATE_REFERENCE, ZoneId.of("+12:00")));
+
+ return dateTimeList;
+ }
}