We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e82c9cf + 48743c9 commit 68410d5Copy full SHA for 68410d5
OCPP-J/src/main/java/eu/chargetime/ocpp/JSONCommunicator.java
@@ -7,6 +7,7 @@
7
import eu.chargetime.ocpp.model.Message;
8
import java.lang.reflect.Type;
9
import java.time.ZonedDateTime;
10
+import java.time.format.DateTimeFormatter;
11
import org.slf4j.Logger;
12
import org.slf4j.LoggerFactory;
13
@@ -81,7 +82,7 @@ private class ZonedDateTimeSerializer implements JsonSerializer<ZonedDateTime> {
81
82
@Override
83
public JsonElement serialize(
84
ZonedDateTime zonedDateTime, Type type, JsonSerializationContext jsonSerializationContext) {
- return new JsonPrimitive(zonedDateTime.toString());
85
+ return new JsonPrimitive(zonedDateTime.format(DateTimeFormatter.ISO_INSTANT));
86
}
87
88
0 commit comments