aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/http/JsonConverter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/http/JsonConverter.java')
-rw-r--r--src/org/traccar/http/JsonConverter.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/org/traccar/http/JsonConverter.java b/src/org/traccar/http/JsonConverter.java
index f7c5a5622..6cdba5492 100644
--- a/src/org/traccar/http/JsonConverter.java
+++ b/src/org/traccar/http/JsonConverter.java
@@ -34,8 +34,12 @@ import org.traccar.model.Factory;
public class JsonConverter {
- public static final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ");
-
+ private static final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
+
+ public static Date parseDate(String value) throws ParseException {
+ return dateFormat.parse(value);
+ }
+
public static <T extends Factory> T objectFromJson(Reader reader, T prototype) throws ParseException {
return objectFromJson(Json.createReader(reader).readObject(), prototype);
}