The origins of our 24 hours a day can be traced back at least 4000 years, to ancient Egypt and Babylon, and perhaps further back in time. The Egyptians and Babylonians divided the parade of stars that appeared in the sky each night into 12 sections, marked by the various stars that rose and set that night.

For example, the star Procyon might rise shortly after sunset one evening, followed about an hour later by Sirius. This defined a kind of heavenly clock, although different groups of 12 stars were used to cope with the slow shift of the night sky during the year. The daylight hours were divided into 12, to match. Two sets of 12 give 24, hence the number of hours in a day.

(The famous astronomical ceiling at Senmut shows a series of circles divided into 24 sections. It’s not clear what these circles signify - the 12 circles are labelled with month names.)

The Romans inherited the 24 hour day from the Egyptians, via the Greeks: 12 hours of daylight, followed by 12 hours of night, with hours of variable length depending on the time of year.

They started counting from sunrise (hour 1 = Prima), so hour 3 (Tertia) was mid-morning, hour 6 (Sexta) was midday, and hour 9 (None) was mid afternoon. Echoes of this system linger today - we call a midday break a siesta, and noon is derived from None (but may have crept forward due to hunger).

Sundials, and many older 24 hour analog clocks/watches used the double-XII system (two sets of 1 to 12, usually in Roman numerals, one for the night/morning, one for the afternoon/evening), rather than numbering the hours from 0 or 1 to 23 or 24.

(An engraving from an 18th century treatise by Ferguson showing how a sundial would look if numbered all the way round the edge)