diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-22 11:40:02 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-22 11:40:02 +1200 |
commit | a7296d99876000e65bef9b9df708f57ebabbe894 (patch) | |
tree | 27175047d4b59b55c3e59d5bfafff96255570202 /src/org/traccar/Context.java | |
parent | 02d5eb894a4c5f5fe8270303af2c8ba4be03b530 (diff) | |
download | trackermap-server-a7296d99876000e65bef9b9df708f57ebabbe894.tar.gz trackermap-server-a7296d99876000e65bef9b9df708f57ebabbe894.tar.bz2 trackermap-server-a7296d99876000e65bef9b9df708f57ebabbe894.zip |
Fix date formatting (fix #4063)
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r-- | src/org/traccar/Context.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java index f7bc18d1d..334503640 100644 --- a/src/org/traccar/Context.java +++ b/src/org/traccar/Context.java @@ -20,6 +20,8 @@ import com.fasterxml.jackson.databind.SerializationFeature; import java.net.InetAddress; import java.net.UnknownHostException; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; import java.util.Properties; import com.fasterxml.jackson.datatype.jsr353.JSR353Module; @@ -92,6 +94,8 @@ public final class Context { private static final Logger LOGGER = LoggerFactory.getLogger(Context.class); public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; + public static final DateTimeFormatter DATE_FORMATTER = + DateTimeFormatter.ISO_OFFSET_DATE_TIME.withZone(ZoneId.systemDefault()); private Context() { } |