You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by dk...@apache.org on 2019/01/03 21:30:49 UTC
[avro] branch master updated: [AVRO-2290] Truncate to millis for
the timestamps as that's what the converter will use
This is an automated email from the ASF dual-hosted git repository.
dkulp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/master by this push:
new 0c223c9 [AVRO-2290] Truncate to millis for the timestamps as that's what the converter will use
0c223c9 is described below
commit 0c223c9da6d0286c9e16257cef8b9988099cf8a2
Author: Daniel Kulp <dk...@apache.org>
AuthorDate: Thu Jan 3 16:26:58 2019 -0500
[AVRO-2290] Truncate to millis for the timestamps as that's what the converter will use
---
.../java/org/apache/avro/specific/TestSpecificLogicalTypes.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lang/java/avro/src/test/java/org/apache/avro/specific/TestSpecificLogicalTypes.java b/lang/java/avro/src/test/java/org/apache/avro/specific/TestSpecificLogicalTypes.java
index ed64a77..5ebac66 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/specific/TestSpecificLogicalTypes.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/specific/TestSpecificLogicalTypes.java
@@ -28,6 +28,7 @@ import java.math.RoundingMode;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import java.time.temporal.ChronoField;
+import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
@@ -120,8 +121,8 @@ public class TestSpecificLogicalTypes {
3019.34,
null,
java.time.LocalDate.now(),
- java.time.LocalTime.now(),
- java.time.Instant.now(),
+ java.time.LocalTime.now().truncatedTo(ChronoUnit.MILLIS),
+ java.time.Instant.now().truncatedTo(ChronoUnit.MILLIS),
new BigDecimal(123.45f).setScale(2, RoundingMode.HALF_DOWN)
);
@@ -181,8 +182,8 @@ public class TestSpecificLogicalTypes {
3019.34,
null,
java.time.LocalDate.now(),
- java.time.LocalTime.now(),
- java.time.Instant.now(),
+ java.time.LocalTime.now().truncatedTo(ChronoUnit.MILLIS),
+ java.time.Instant.now().truncatedTo(ChronoUnit.MILLIS),
new BigDecimal(123.45f).setScale(2, RoundingMode.HALF_DOWN)
);