Parse time properly