For most of history, the time of day was a property of a place rather than a number on a wire. Noon was the moment the sun crossed the local meridian — the imaginary line running north to south through your town — and every town's noon arrived at a slightly different instant from its neighbour's. A degree of longitude is four minutes of solar time, so Bristol ran about ten minutes behind London and Calcutta ran roughly an hour ahead of Bombay.
Why nobody minded
This was not a problem while travel was slow and the fastest message a person could send travelled at the speed of a horse. It became one the moment a timetable existed. A train that leaves at 09:15 and arrives at 12:40 has to mean the same thing at both ends, and it cannot if both ends keep their own noon. The railways solved the problem before governments did: from 1840 British railways ran on "London time", posted at stations alongside local time, so that a town could display two clocks, four minutes apart, and both be correct.
The railways forced the change
The legal change came later and more slowly. Britain made Greenwich Mean Time the standard for the whole island in 1880, forty years after the railways had done it by practice. The United States was more fragmented: until 1883, railroads used dozens of local times, and a stationmaster might keep three clocks for three directions of travel. On 18 November 1883 — "the day of two noons" — American railroads adopted four zones, and many towns reset their clocks at noon, twice.
The international framework followed in October 1884, when delegates from 25 countries met in Washington for the International Meridian Conference. They chose the meridian of Greenwich as the prime meridian, by 22 votes to one, with two abstentions. France, still smarting, kept Paris mean time for civil purposes until 1911, and used the phrase "Paris mean time retarded by 9 minutes 21 seconds" in international correspondence rather than admit that its time was a function of London.
The astronomical catch
Underneath the politics is an astronomical subtlety. Apparent solar time — what a sundial shows — is not uniform, because the Earth's orbit is elliptical and its axis is tilted. The gap between sundial time and mean solar time swings by about a quarter of an hour over the year, a difference captured in the thin figure-eight called the analemma printed on older globes. Mean solar time averages that wobble away, which is why every clock since the pendulum has kept mean time and every sundial has quietly disagreed.
What standard time replaced, then, was not a worse system but a different one: time as a local fact, measured by the sun, varying smoothly across the surface of the planet. What it created was time as a shared convention — a number that a telegraph could carry and a timetable could assume, and which no town owns. Almost every argument about time zones since has been an argument about how far that convention may stray from the sun.