code: public static String format(Date time) {
          DateFormat timeFormat = new SimpleDateFormat(TimeField.FORMAT);
          return time == null ? null : timeFormat.format(time);
      }
docs: 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.