Skip to content

Commit 10fb834

Browse files
committed
Added not null milliseconds test for date
1 parent 88131c5 commit 10fb834

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/test/java/de/zalando/typemapper/postgres/PgSerializerTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package de.zalando.typemapper.postgres;
22

33
import java.sql.SQLException;
4+
import java.time.Instant;
5+
import java.time.format.DateTimeFormatter;
46
import java.util.Arrays;
57
import java.util.Collection;
68
import java.util.Date;
@@ -60,6 +62,7 @@ public static Collection<Object[]> generateData() throws SQLException {
6062
new Object[][] {
6163
{new Date(112, 11, 1, 6, 6, 6), Pattern.compile("2012-12-01 06:06:06[+-]?\\d{2}")},
6264
{new Date(112, 9, 1, 6, 6, 6), Pattern.compile("2012-10-01 06:06:06[+-]?\\d{2}")},
65+
{Date.from(DateTimeFormatter.ISO_OFFSET_DATE_TIME.parse("2017-05-14T12:34:56.123456789+00:00", Instant::from)), Pattern.compile("2017-05-14 14:34:56.123000[+-]?\\d{2}")},
6366
{1, "1"},
6467
{69, "69"},
6568
{true, "t"},

0 commit comments

Comments
 (0)