Get time correctly