public LocalTime getInternalLocalTime(ColumnInformation columnInfo, TimeZone timeZone)
      throws SQLException {
    if (lastValueWasNull()) {
      return null;
    }
    if (length == 0) {
      lastValueNull |= BIT_LAST_FIELD_NULL;
      return null;
    }

    String raw = new String(buf, pos, length, StandardCharsets.UTF_8);

    switch (columnInfo.getColumnType().getSqlType()) {
      case Types.TIME:
      case Types.VARCHAR:
      case Types.LONGVARCHAR:
      case Types.CHAR:
        try {
          return LocalTime
              .parse(raw, DateTimeFormatter.ISO_LOCAL_TIME.withZone(timeZone.toZoneId()));
        } catch (DateTimeParseException dateParserEx) {
          throw new SQLException(
              raw + " cannot be parse as LocalTime (format is \"HH:mm:ss[.S]\" for data type \""
                  + columnInfo.getColumnType() + "\")");
        }

      case Types.TIMESTAMP:
        ZonedDateTime zonedDateTime = getInternalZonedDateTime(columnInfo, LocalTime.class,
            timeZone);
        return zonedDateTime == null ? null
            : zonedDateTime.withZoneSameInstant(ZoneId.systemDefault()).toLocalTime();

      default:
        throw new SQLException(
            "Cannot read LocalTime using a " + columnInfo.getColumnType().getJavaTypeName()
                + " field");
    }

  }
public LocalTime getInternalLocalTime ( ColumnInformation columnInfo , TimeZone timeZone ) throws SQLException { if ( lastValueWasNull ( ) ) { return null ; } if ( length == 0 ) { lastValueNull |= BIT_LAST_FIELD_NULL ; return null ; } String raw = new String ( buf , pos , length , StandardCharsets . UTF_8 ) ; switch ( columnInfo . getColumnType ( ) . getSqlType ( ) ) { case Types . TIME : case Types . VARCHAR : case Types . LONGVARCHAR : case Types . CHAR : try { return LocalTime . parse ( raw , DateTimeFormatter . ISO_LOCAL_TIME . withZone ( timeZone . toZoneId ( ) ) ) ; } catch ( DateTimeParseException dateParserEx ) { throw new SQLException ( raw + " cannot be parse as LocalTime (format is \"HH:mm:ss[.S]\" for data type \"" + columnInfo . getColumnType ( ) + "\")" ) ; } case Types . TIMESTAMP : ZonedDateTime zonedDateTime = getInternalZonedDateTime ( columnInfo , LocalTime . class , timeZone ) ; return zonedDateTime == null ? null : zonedDateTime . withZoneSameInstant ( ZoneId . systemDefault ( ) ) . toLocalTime ( ) ; default : throw new SQLException ( "Cannot read LocalTime using a " + columnInfo . getColumnType ( ) . getJavaTypeName ( ) + " field" ) ; } }
Get LocalTime format from raw text format.

@param columnInfo column information
@param timeZone   time zone
@return LocalTime value
@throws SQLException if column type doesn't permit conversion