diff options
author | Abyss777 <abyss@fox5.ru> | 2016-11-23 11:41:11 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-11-23 11:41:11 +0500 |
commit | b14169a2b7bfcaecaa0f5ea9baafad4e7e4f1ae2 (patch) | |
tree | a82bf3699fc76a6a46da9835de846970db7722e3 /src/org/traccar/helper | |
parent | 5f867c6077f79a2a1d3b8ec18f78c3a2657ba698 (diff) | |
download | trackermap-server-b14169a2b7bfcaecaa0f5ea9baafad4e7e4f1ae2.tar.gz trackermap-server-b14169a2b7bfcaecaa0f5ea9baafad4e7e4f1ae2.tar.bz2 trackermap-server-b14169a2b7bfcaecaa0f5ea9baafad4e7e4f1ae2.zip |
- Pass client timezone to excel template
- Templates: adjust timezone, use "https" in links
Diffstat (limited to 'src/org/traccar/helper')
-rw-r--r-- | src/org/traccar/helper/DateUtil.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/org/traccar/helper/DateUtil.java b/src/org/traccar/helper/DateUtil.java index ad8534eb8..840f37a7a 100644 --- a/src/org/traccar/helper/DateUtil.java +++ b/src/org/traccar/helper/DateUtil.java @@ -18,12 +18,14 @@ package org.traccar.helper; import java.util.Calendar; import java.util.Date; +import org.joda.time.DateTime; import org.joda.time.format.DateTimeFormatter; import org.joda.time.format.ISODateTimeFormat; public final class DateUtil { private static final DateTimeFormatter DATE_FORMAT = ISODateTimeFormat.dateTime(); + private static final DateTimeFormatter DATE_FORMAT_NOMILLIS = ISODateTimeFormat.dateTimeNoMillis(); private DateUtil() { } @@ -64,4 +66,8 @@ public final class DateUtil { return DATE_FORMAT.parseDateTime(value).toDate(); } + public static DateTime parseDateTime(String value) { + return DATE_FORMAT_NOMILLIS.withOffsetParsed().parseDateTime(value); + } + } |