aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/http/JsonConverter.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-05-20 16:57:21 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-05-20 16:57:21 +1200
commit6dfee3947ef96e1092b668ecfc7c58037355ffb8 (patch)
treed29ab479106c97b6443bc9c6a439f315bafa18b0 /src/org/traccar/http/JsonConverter.java
parenteb586ea7e074c87444663aa71e9da6f538429ae5 (diff)
downloadtrackermap-server-6dfee3947ef96e1092b668ecfc7c58037355ffb8.tar.gz
trackermap-server-6dfee3947ef96e1092b668ecfc7c58037355ffb8.tar.bz2
trackermap-server-6dfee3947ef96e1092b668ecfc7c58037355ffb8.zip
Implement position report loading
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);
}