I am using a DS3231 with my Arduino Uno to make a dog feeder. I have built the system, but I am uninformed about I2C communication. I am trying to write a function that reads the time from the DS3231, however the library returns a string for the time and I cannot compare the value to set value to feed my dog. If anyone has any experience with setting up an alarm clock that would be very much appreciated. I have tried looking at some code for an Arduino alarm clock but I get lost. Thank-you in advance.
however the library returns a string for the time
It might not be obvious that there are hundreds of Arduino libraries, but there are. Specifics are much more useful than hand waving.
Have a look at Rodan's library for DS3231 which can be downloaded from here.
This library comes with alarm examples which you could use to get adjusted to your needs.
Make sure that you delete or at least rename the other DS3231 libraries (especially the .h and .cpp files) which you installed previously to avoid that the wrong library is loaded by the compiler and you wonder that the example sketch won't compile with the previous library.