I thought I had to work 8 hours, but then I had a problem with my neck/shoulder that caused me to have to do an hour+ of physical therapy exercises at home each morning, and i started coming in to the office later in the morning like around 10 am.
I found that I could still get my work done and do well. I worked 10-5 all last year while taking hour+ lunches and still got promoted and everyone was happy with my output.