Funny you should ask. I just downloaded a hot copy of form 1542 just before coming to the site.
I have always broken the day into quarters - 0000 to 0600, 0600 to noon, noon to 1800, 1800 to 0000. Then I see what city I spent the night in and apply either 1,2,3, or 4 quarters at that cities' applicable rate. I have usually broken the day at noon, so I apply the day prior to noon at the previous cities' rate and after noon at the next cities' rate. If the duty period ends in a quarter I give myself credit for that quarter - even if I duty off at 1205. However, if my duty off is 1759 I don't get greedy and take the next quarter.
One thing to remember is that on out - and - back trips, the IRS gives no credit for per diem. So, even if you receive per diem during O&B trips, you can't claim excess credit towards them. This kind of per diem should have been taxed as income on your pay stubs.
This method was recommended by a tax preparer who was familiar with airline operations, and was seconded by a pilot I worked with who had been an IRS agent before reforming himself.
I'm due a bunch of credit for time where I received no per diem this year. I was in initial training for two and a half months away from base, and this is going to add up to some serious credit. Too bad I didn't make more this year, since I'm going to write off a bunch of now - worthless (OK, it was pretty worthless before) Vanguard stock I bought when things looked rosy there.