It looks as though this line:
Time t = rtc.time();
near the start of the print_time() function is doing the actual reading of the time from the DS1302. You might want to look at the documentation for the Time class, and see if there are any other useful public functions, perhaps to help you with comparisons of Time objects.
If you want to know why you are getting compilation errors, it would be helpful if you showed us what the errors are. Also, it's a lot easier for people to read your code if if you use the "code" tags, as explained in the "How to use this forum" post at the top. See here: