Sundials are perhaps the most ancient of scientific instruments, and the earliest known form of time-keeping. They probably started life as poles in the ground with the direction and length of the shadow giving an approximate time of day. However, by the middle of the second millennium BC there were already fixed and portable versions of more accurate sundials being produced in the Middle East, Egypt and China. These early sundials relied on the height of the sun in the sky to indicate the time by the length of the shadow it produced.