I looked it up. According to the book cited above, it appears that an engineer from the Department of Buildings reported that the structural damage to the towers appeared to be immense and that the stability of both buildings was compromised. He was, though, particularly worried about how long the north tower would stand.
John Peruggia, a fire dept delegate who was in on this meeting of emergency response officials in the lobby of WTC7, heeded the warnings from the building dept engineer despite the previous conventional wisdom about the strength of the buildings and summoned Rich Zarillo, an EMT, who was working for him as an aide, to go to the command post where Chief Ganci was located and deliver the message.
"You see Chief Ganci, and Chief Ganci only," Peruggia said. "Provide him with the information that the building integrity is severely compromised and they believe the building is in danger of of imminent collapse."
When Zarillo got there, he gave the message that the buildings were near collapse to Chief Ganci's aide, Fire Marshall Steve Mosiello.
Mosiello turned to his boss, a few steps away, and said, "Chief, these buildings are in imminent danger of collapse."
Ganci looked stunned and asked, "Who would tell you something like that?"
Mosiello turned to Zarillo and said, "Richie, come over here and tell the chief what you just told me."
Right after Ganci heard the message delivered by Rich Zarillo about the threat of imminent collapse, a gathering rumble filled the air. "What the f*** was that?, Ganci asked. A glance at the south tower, its top dissolving into smoke, answered his question.
As noted above, that is from the Dwyer and Flynn book. I haven't seen anything that suggests that the NYPD aerial crews reported on the imminent collapse of the south tower, only the north. But it does appear that the engineers on the ground were worried about the collapse of both towers early on. Unfortunately, not soon enough in the case of the south tower.
Edit to add: the meeting that Peruggia was at took place as part of his duties on the OEM team, so it is logical to assume that Guiliani would have heard about the info from the building dept engineer regarding the danger of collapse at the same time. The time of this exchange is not given in the book, but it says that Peruggia had to then contact Zarillo (to fill him in and give him instructions, presumably) and that Zarillo couldn't get to Chief Ganzi's location easily due to the flaming debris and falling bodies, so it seems it took a period of time for him to get there.
From the timeline, it seems that Zarillo didn't get there until after Chief Palmer had made it to the 78th floor of the south tower and after Kevin Cosgrove called his brother, and after Rick Thorpe called 911 saying that people on 106 were passing out, and after Greg Milanowycz called his father, and just at the time that Kevin Cosgrove was on the phone to 911.
In other words, only moments before the south tower collapsed. But it is impossible from this account to determine the time that the building dept engineer gave the word that the buildings were in danger of imminent collapse.