public TimestampTZ parseTimestamp(String text, ZoneId defaultTimeZone) {
    Objects.requireNonNull(text);
    for (DateTimeFormatter f : dtFormatters) {
      try {
        return TimestampTZUtil.parse(text, defaultTimeZone, f);
      } catch (DateTimeException e) {
        // Ignore and try next formatter
      }
    }
    return TimestampTZUtil.parse(text, defaultTimeZone);
  }
Parse the input string and return a timestamp value.

@param text The timestamp text
@return A timestamp based on the text provided
@throws IllegalArgumentException if input text cannot be parsed into
          timestamp
common/src/java/org/apache/hive/common/util/TimestampParser.java