Turn servo when given time and rtc matches

Serial.print(t.substring(0, 8).equals(feedTime.substring(0, 8)));

Returns 0, it returns 0 even if I compare the complete strings. I print them and they seem to be equal (both 22:15:15 for example), however, the .equals function does not return anything other than 0. I input the feedTime by 4x4 keypad on serial monitor.