code: public Timestamp toTimestampBin(TimeZone tz, byte[] bytes, boolean timestamptz)
        throws PSQLException {
  
      ParsedBinaryTimestamp parsedTimestamp = this.toParsedTimestampBin(tz, bytes, timestamptz);
      if (parsedTimestamp.infinity == Infinity.POSITIVE) {
        return new Timestamp(PGStatement.DATE_POSITIVE_INFINITY);
      } else if (parsedTimestamp.infinity == Infinity.NEGATIVE) {
        return new Timestamp(PGStatement.DATE_NEGATIVE_INFINITY);
      }
  
      Timestamp ts = new Timestamp(parsedTimestamp.millis);
      ts.setNanos(parsedTimestamp.nanos);
      return ts;
    }
docs: Returns the SQL Timestamp object matching the given bytes with {@link Oid#TIMESTAMP} or
  {@link Oid#TIMESTAMPTZ}.
  
  @param tz The timezone used when received data is {@link Oid#TIMESTAMP}, ignored if data
  already contains {@link Oid#TIMESTAMPTZ}.
  @param bytes The binary encoded timestamp value.
  @param timestamptz True if the binary is in GMT.
  @return The parsed timestamp object.
  @throws PSQLException If binary format could not be parsed.