Comparing between string and time