aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/api/ObjectMapperProvider.java2
-rw-r--r--web/app/model/Device.js3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/api/ObjectMapperProvider.java b/src/org/traccar/api/ObjectMapperProvider.java
index b68f9a458..5a9cbb9d9 100644
--- a/src/org/traccar/api/ObjectMapperProvider.java
+++ b/src/org/traccar/api/ObjectMapperProvider.java
@@ -29,7 +29,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'Z'");
+ DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
mapper.setConfig(mapper.getSerializationConfig().with(dateFormat));
diff --git a/web/app/model/Device.js b/web/app/model/Device.js
index 983e3e62e..3cd9ee560 100644
--- a/web/app/model/Device.js
+++ b/web/app/model/Device.js
@@ -32,6 +32,7 @@ Ext.define('Traccar.model.Device', {
type: 'string'
}, {
name: 'lastUpdate',
- type: 'date'
+ type: 'date',
+ dateWriteFormat: 'C'
}]
});