On this day in 1918, President Woodrow Wilson signed the Standard Time Act into law, dividing the continental U.S. into five distinct time zones and implementing daylight saving time. In an act of wisdom, Congress repealed the part of the law imposing daylight saving time a year later. In 1966, though, Congress decided to reimpose the system. Since then, we've all had to change our clocks twice a year.
There were good reasons to create time zones. Firstly, people had no idea what time it would be in many places because time was managed locally. Secondly, railroad firms were already running their operations based on four zones to make them more effective. Towns typically followed their lead, but they didn't have to. Now, under the 1966 law, the only people who can change time-zone boundaries are the transportation secretary or Congress.
DST, on the other hand, was unpopular from the start. Farmers decried it, saying it gave them less time to take their goods to market. But across the globe, countries were adopting it to save fuel during and after World War I. When Congress rolled back the system, New York City kept it, leading other places to follow its lead. The nation had to impose "War Time" for a few years during World War II, a year-round form of DST, in another bid to create savings. The time-of-day confusion eventually led the transportation industry to ask the government to settle on a nationwide system, and so we got the 1966 bill.
As of 2023, several states and territories didn't observe DST, including Arizona, Hawaii, and all five of the populated U.S. territories.
There's a good write-up on the Standard Time Act of 1918 at the Congress Project.