Change time to timestamp