Before the railways, local mean time was the time kept by clocks and used for general purposes in the UK, insofar as people kept time by clocks rather than by the sun. (Mean time, as shown by sufficiently accurate clocks, had largely replaced apparent time, as shown by a sundial, from around the end of the eighteenth century.) With the coming of the railways, it became a significant problem for timetables that the time at one end of a railway line should differ significantly from that at the other. For this reason, in the 1840s the railway companies started to keep London time consistently at their stations and on their trains; on 22 September 1847 it was recommended by the Railway Clearing House that all the railway companies should adopt Greenwich time, and by January 1848 this had generally been done. Over the next few years the rest of the country followed the railways, but in the 1858 case of Curtis v. March it was ruled that the time for legal purposes must be considered to be local mean time. In 1880 the legal time for Great Britain was made Greenwich mean time by Act of Parliament