Skip to content

Commit 384f8dc

Browse files
committed
Add test for max Date
1 parent 744a867 commit 384f8dc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,12 @@ private static Stream<Arguments> testToLocalDateTimeTimeZone() {
145145
new Date(Long.MIN_VALUE),
146146
TimeZone.getTimeZone("GMT")
147147
),
148+
Arguments.of(
149+
// +292278994-08-17T07:12:55.807
150+
LocalDateTime.of(292278994, 8, 17, 7, 12, 55, 807_000_000),
151+
new Date(Long.MAX_VALUE),
152+
TimeZone.getTimeZone("GMT")
153+
),
148154
Arguments.of(
149155
LocalDateTime.ofInstant(Instant.EPOCH, TimeZone.getTimeZone("GMT").toZoneId()),
150156
java.sql.Timestamp.valueOf("1970-01-01 00:00:00"),

0 commit comments

Comments
 (0)