Convert Time to timestamp