code: public static DateValue parseDateValue(String s, TimeZone tzid)
              throws ParseException {
          Matcher m = DATE_VALUE.matcher(s);
          if (!m.matches()) {
              throw new ParseException(s, 0);
          }
          int year = Integer.parseInt(m.group(1)),
                  month = Integer.parseInt(m.group(2)),
                  day = Integer.parseInt(m.group(3));
          if (null != m.group(4)) {
              int hour = Integer.parseInt(m.group(4)),
                      minute = Integer.parseInt(m.group(5)),
                      second = Integer.parseInt(m.group(6));
              boolean utc = null != m.group(7);
  
              DateValue dv = new DTBuilder(
                      year, month, day, hour, minute, second).toDateTime();
              if (!utc && null != tzid) {
                  dv = TimeUtils.toUtc(dv, tzid);
              }
              return dv;
          } else {
              return new DTBuilder(year, month, day).toDate();
          }
      }
docs: parses a date of the form yyyymmdd or yyyymmdd'T'hhMMss converting from
  the given timezone to UTC.