(CNN)First, it was the snowy weather. An American Airlines flight trying to leave Boston on Sunday night was delayed for about 2½ hours before it finally took off at 10:52 p.m. The crew of American Flight 223 knew hours before takeoff that they couldn't go the distance to Los Angeles. The first officer was going to exceed his allotted work time, as dictated by the Federal Aviation Administration, if he flew the entire route, American spokeswoman Victoria Lupica said. That's why the crew made the decision to divert to Chicago O'Hare International Airport that night and informed the passengers hours prior to takeoff, Lupica said.
@highlight
Weather delayed an American flight out of Boston for more than two hours
@highlight
Pilot work rules forced the flight to divert to Chicago
Chicago O'Hare International Airport
Chicago
The passengers were told about the stop in @placeholder while still in the Boston boarding area, several hours before departing, she said.
Chicago O'Hare International Airport
Chicago
"It was prudent to depart and be able to go as far as @placeholder," especially with the snow predictions in the Boston area.
Chicago O'Hare International Airport
Chicago
Flight 223's passengers landed in @placeholder just after midnight and were put up in hotels overnight.