do..while

B1Gtone:

void PAUSE_CLOCK_HANDS() {

int second;
while (second <= 30) {
  byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
  readDS3231time(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
Serial.print(hour);
Serial.print(":");
Serial.print(minute);
Serial.print(":");
Serial.println(second);

}

}




This reads the RTC and outputs the time to serial.print

The time reads and advances correctly but the seconds advance past 30 without exiting the while loop

You declare second as an int and then as a byte.
Which one is the RTC read stuffing data into?
Which one is being compared to 30?

Try moving this line

byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;

above the while and getting rid of

int second;

You can't be ambiguous with the compiler, it will give unexpected results.