Parse time to unix timestamp