Help: Pulling integers out of a string, then making a comparison

This is an excellent example of an XY problem.

What is an XY problem? http://xyproblem.info/

Please give a link to the library you are using, or to the page on which it can be found. (Please do not tell us to "just google it". There might be more than one library, or more than one version of the library.)

If your library genuinely provides no way to get the time except as a string, then I would say it is time to look for another library.