aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web/client/FormatterUtil.java
blob: f5c7d3e11eea518229dd53ca657ec9b0004710f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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);
    }

}