This is something that happens so often I go mad of it.
I had to leave the office at 12:00 to go to a customer, and I wanted to finish a feature first. I arrived early and started working on it. Three hours later, I didn't even got started, I was busy fixing stupid assembly version errors, and tracking down dependencies that somehow got lost.
Finally I resolved the issues with the abrupt manner of 5kg Hammer and went to fiddle with production databases. The idea is to move anxiety to other people. It worked, eventually, but I had to leave instructions to do a full DB backup and gave the neighbor's phone.
At 10:35, I got things started, and I soon had everything rolling out, until I got to JS issues with the wrong this reference. Found out how to do it in prototype, found out how to do it jQuery, made it work. Now I had another two hours to get it working, but I was already late. Urgh!
When I got to the customer, we manage to run through scenario & features in a way that was so much more natural. We finished about two days work in 5 hours.
I don't mind deadlines that are in days / weeks. I like them (or I tell the customer that they are impossible and move on) usually.
What I truly hate is a deadline in hours, even if it is not a "deadline" in the usual sense. I just hate knowing that I need to stop working at a certain hour. That seem to always cause me to get to that hour. When I don't have that time limit, things go much smoother.