[OLINGO-1408] Minor change to fix tests

This commit is contained in:
Michael Bolz 2019-11-25 21:28:36 +01:00
parent 302f991e5b
commit ec603917e5
1 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@ import java.time.LocalDateTime;
import java.time.ZoneId; import java.time.ZoneId;
import java.time.ZoneOffset; import java.time.ZoneOffset;
import java.time.ZonedDateTime; import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException; import java.time.format.DateTimeParseException;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
import java.util.Calendar; import java.util.Calendar;
@ -138,7 +139,7 @@ public final class EdmDateTimeOffset extends SingletonPrimitiveType {
} }
private static String format(LocalDateTime dateTime, ZoneOffset offset, int nanos) { 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) { if (nanos > 0) {
str = removeTrailingZeros(str); str = removeTrailingZeros(str);
} }