Why is my time displaying wrong