public static String format(Date time) {
        DateFormat timeFormat = new SimpleDateFormat(TimeField.FORMAT);
        return time == null ? null : timeFormat.format(time);
    }
Converts the given time into a string which follows the format used by
time fields.

@param time
    The time value to format, which may be null.

@return
    The formatted time, or null if the provided time was null.
guacamole-ext/src/main/java/org/apache/guacamole/form/TimeField.java