diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-02-17 11:42:55 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-02-17 11:42:55 +1300 |
commit | 2a940c45a38cec42a6a85714f7941ee8613f48ee (patch) | |
tree | dadb0078d0896b551b7e5e7ad4861276205b3e00 /src/org/traccar/web/client/model | |
parent | fdebc0f3b0453f7898090be98a3edf9664083471 (diff) | |
download | trackermap-web-2a940c45a38cec42a6a85714f7941ee8613f48ee.tar.gz trackermap-web-2a940c45a38cec42a6a85714f7941ee8613f48ee.tar.bz2 trackermap-web-2a940c45a38cec42a6a85714f7941ee8613f48ee.zip |
Added formatter utility
Diffstat (limited to 'src/org/traccar/web/client/model')
-rw-r--r-- | src/org/traccar/web/client/model/StateReader.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/org/traccar/web/client/model/StateReader.java b/src/org/traccar/web/client/model/StateReader.java index a3549179..733bde62 100644 --- a/src/org/traccar/web/client/model/StateReader.java +++ b/src/org/traccar/web/client/model/StateReader.java @@ -3,11 +3,10 @@ package org.traccar.web.client.model; import java.util.LinkedList; import java.util.List; +import org.traccar.web.client.ApplicationContext; import org.traccar.web.shared.model.Position; import org.traccar.web.shared.model.XmlParser; -import com.google.gwt.i18n.client.DateTimeFormat; - public class StateReader { private static String toString(Object object) { @@ -21,7 +20,7 @@ public class StateReader { List<StateItem> state = new LinkedList<StateItem>(); state.add(new StateItem("valid", toString(position.getValid()))); - state.add(new StateItem("time", DateTimeFormat.getFormat("yyyy-MM-dd HH:mm:ss").format(position.getTime()))); + state.add(new StateItem("time", ApplicationContext.getInstance().getFormatterUtil().formatTime(position.getTime()))); state.add(new StateItem("latitude", toString(position.getLatitude()))); state.add(new StateItem("longitude", toString(position.getLongitude()))); state.add(new StateItem("altitude", toString(position.getAltitude()))); |