aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/ObjectMapperProvider.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/api/ObjectMapperProvider.java')
-rw-r--r--src/org/traccar/api/ObjectMapperProvider.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/org/traccar/api/ObjectMapperProvider.java b/src/org/traccar/api/ObjectMapperProvider.java
index 5a9cbb9d9..b323a318b 100644
--- a/src/org/traccar/api/ObjectMapperProvider.java
+++ b/src/org/traccar/api/ObjectMapperProvider.java
@@ -16,6 +16,7 @@
package org.traccar.api;
import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
import javax.ws.rs.ext.ContextResolver;
import javax.ws.rs.ext.Provider;
@@ -29,11 +30,7 @@ public class ObjectMapperProvider implements ContextResolver<ObjectMapper> {
private ObjectMapper mapper = new ObjectMapper();
public ObjectMapperProvider() {
- DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
- dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
-
- mapper.setConfig(mapper.getSerializationConfig().with(dateFormat));
- mapper.setConfig(mapper.getDeserializationConfig().with(dateFormat));
+ mapper.setConfig(mapper.getSerializationConfig().without(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS));
}
@Override