Comparing Time with the_time();

the_time() doesn’t return the current time, it returns the time of the current post, also it echoes the result.

If you need the current time, simply use PHPs native time() function.