docs: public Date toDateBin(TimeZone tz, byte[] bytes) throws PSQLException {
      if (bytes.length != 4) {
        throw new PSQLException(GT.tr("Unsupported binary encoding of {0}.", "date"),
            PSQLState.BAD_DATETIME_FORMAT);
      }
      int days = ByteConverter.int4(bytes, 0);
      if (tz == null) {
        tz = getDefaultTz();
      }
      long secs = toJavaSecs(days * 86400L);
      long millis = secs * 1000L;
  
      if (millis <= PGStatement.DATE_NEGATIVE_SMALLER_INFINITY) {
        millis = PGStatement.DATE_NEGATIVE_INFINITY;
      } else if (millis >= PGStatement.DATE_POSITIVE_SMALLER_INFINITY) {
        millis = PGStatement.DATE_POSITIVE_INFINITY;
      } else {
        // Here be dragons: backend did not provide us the timezone, so we guess the actual point in
        // time
  
        millis = guessTimestamp(millis, tz);
      }
      return new Date(millis);
    }