secure time string comparision