Was flying out of HKG today 2 July and noticed that UA896 to ORD was delayed for around 4.5 hours and had to divert to SFO first (probably due to crew duty time given the lengthy delay) before heading onto ORD. Original aircraft was N793UA but then they switched to N224UA which had come in on time from SIN that morning...