From ec603917e5cc7bc5c8caf917435ec890b632fd84 Mon Sep 17 00:00:00 2001 From: Michael Bolz Date: Mon, 25 Nov 2019 21:28:36 +0100 Subject: [PATCH] [OLINGO-1408] Minor change to fix tests --- .../commons/core/edm/primitivetype/EdmDateTimeOffset.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java index 6b63c9a4b..0280c5ff0 100644 --- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java +++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/primitivetype/EdmDateTimeOffset.java @@ -24,6 +24,7 @@ import java.time.LocalDateTime; import java.time.ZoneId; import java.time.ZoneOffset; import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; import java.time.format.DateTimeParseException; import java.time.temporal.ChronoUnit; import java.util.Calendar; @@ -138,7 +139,7 @@ public final class EdmDateTimeOffset extends SingletonPrimitiveType { } private static String format(LocalDateTime dateTime, ZoneOffset offset, int nanos) { - String str = dateTime.toString(); + String str = dateTime.format(DateTimeFormatter.ISO_DATE_TIME); if (nanos > 0) { str = removeTrailingZeros(str); }