Sundials have been used since ancient times to tell time by the sun's shadow. The earliest sundials date back to 2000 BC in China and Egypt. Romans spread the use of sundials throughout Europe. Sundials work by casting a shadow on a surface marked to indicate hours of the day. The shadow's position tells the time of day based on the sun's changing position in the sky throughout the year.