Side note. I've seen attorneys price trial work at either a full day or half day which in many cases works out to more than their hourly rate multiplied. I've decided this is because they can't overcharge you since you know how many hours they are working. (4 hours in court is 4 hours. But 4 hours in the office is not always 4 hours.)
Lawyers are a special case. They bill in hours, because there is a near-universal cultural expensive that lawyers are hellaciously expensive. Within their firms, lawyers are managed so as to maximize their billed hours. No lawyer would ever, ever work a 12 hour day for a client and have their final bill not reflect those hours.
If you can bill $350-$450/hr in groups of 40-80 hours at a time without blinking, please disregard my advice.
They do this because it prices out the uncertainty.
If you don't know whether you'll be in court for 3 hours or all day, you need to charge for a full day. Otherwise, if you estimated 3 hours in court and then back to the office to bill someone else for the next 5, but instead you're stuck waiting for the judge for 6 hours, someone has to make up the difference.
Simplest solution is to just always charge for the full day.