Fix string based time comparison