Before 1883, clocks were set to local "sun time," where noon was the time when the sun was highest in the local sky. Use of sun time meant that each town's time was different; Chicago would be nearly 5 minutes ahead of Rockford, or 15 minutes behind Detroit. Such time differences played havoc with railroad schedules.
The General Time Convention of Railroad Managers, meeting in Chicago in November 1883, established four time zones (Eastern, Central, Mountain, and Pacific) for the continental U.S. Each zone was exactly one hour apart. Within a single zone, all railroad facilities, operations, and timetables would use the same "Railroad Standard Time," regardless of local sun time at each station or town.
Even though Standard Time was intended only for railroad use and operations, its obvious benefits for commerce led to its general acceptance nationwide. Congress officially adopted the system in 1918, with the passage of the Standard Time Act.