For most of history, time was local. A town set its clocks by the sun, calling it noon when the sun stood highest in its own sky. Because the sun appears to cross the sky from east to west, noon arrives a little later at each step westward: in Britain, Bristol's noon falls about ten minutes after London's. As long as travel was slow, nobody minded. A coach journey from London to Bristol took most of a day, and a traveller whose watch was ten minutes out by the local clock on arrival hardly noticed.
The railways changed this. A timetable has to say when a train will leave each station, and a timetable that used a different time at every stop was an invitation to confusion and, on lines where trains in both directions shared a single track, to collisions. In 1840 the Great Western Railway began running all its trains on London time, and within a decade most British railway companies had followed. Station clocks showed 'railway time', even where the town hall clock nearby still showed local time.
For some years many towns lived with two times at once. Bristol's Corn Exchange clock was given a second minute hand so that it could show both. Some townspeople resented being told when noon was by a company in London, and a few councils held out for years. But the practical case was hard to resist: the post, the telegraph and the newspapers increasingly ran to the railway's clock, and a town that kept its own time made itself awkward to deal with. In 1880 Parliament made Greenwich Mean Time the legal time throughout Great Britain.
The change is usually told as a story of technology, and the railways certainly forced the question. Yet the railway did not decide the answer. A country could have chosen one national time, several zones or none at all, and countries chose differently: in the United States, far wider than Britain, the railway companies divided the country into several zones in 1883 rather than adopt a single time. What the railways created was a need for agreement; the form the agreement took was settled by people arguing over convenience, pride and who should be in charge.