diff options
Diffstat (limited to 'src/org/traccar/web/client/FormatterUtil.java')
-rw-r--r-- | src/org/traccar/web/client/FormatterUtil.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/org/traccar/web/client/FormatterUtil.java b/src/org/traccar/web/client/FormatterUtil.java new file mode 100644 index 00000000..f5c7d3e1 --- /dev/null +++ b/src/org/traccar/web/client/FormatterUtil.java @@ -0,0 +1,17 @@ +package org.traccar.web.client; + +import java.util.Date; + +import com.google.gwt.i18n.client.DateTimeFormat; + +public class FormatterUtil { + + public DateTimeFormat getTimeFormat() { + return DateTimeFormat.getFormat("yyyy-MM-dd HH:mm:ss"); + } + + public String formatTime(Date time) { + return getTimeFormat().format(time); + } + +} |