diff --git a/src/test/java/io/r2dbc/postgresql/AbstractCodecIntegrationTests.java b/src/test/java/io/r2dbc/postgresql/AbstractCodecIntegrationTests.java index 1cd585a2..daf3d648 100644 --- a/src/test/java/io/r2dbc/postgresql/AbstractCodecIntegrationTests.java +++ b/src/test/java/io/r2dbc/postgresql/AbstractCodecIntegrationTests.java @@ -435,7 +435,7 @@ void localDateTime() { testCodec(LocalDateTime.class, LocalDateTime.now().truncatedTo(ChronoUnit.MICROS), "TIMESTAMP"); testCodec(LocalDateTime.class, LocalDateTime.now().truncatedTo(ChronoUnit.MICROS), "TIMESTAMPTZ"); - Instant now = Instant.now(); + Instant now = Instant.now().truncatedTo(ChronoUnit.MICROS); LocalDateTime ldt = now.atZone(ZoneId.systemDefault()).toLocalDateTime(); testCodec(LocalDateTime.class, ldt, Instant.class, (actual, expected) -> {