public static Date parse(String timeString)
            throws ParseException {

        // Return null if no time provided
        if (timeString == null || timeString.isEmpty())
            return null;

        // Parse time according to format
        DateFormat timeFormat = new SimpleDateFormat(TimeField.FORMAT);
        return timeFormat.parse(timeString);

    }
Parses the given string into a corresponding time. The string must
follow the standard format used by time fields, as defined by
FORMAT and as would be produced by format().

@param timeString
    The time string to parse, which may be null.

@return
    The time corresponding to the given time string, or null if the
    provided time string was null or blank.

@throws ParseException
    If the given time string does not conform to the standard format
    used by time fields.
guacamole-ext/src/main/java/org/apache/guacamole/form/TimeField.java