When You have promised a Date to Launch or something like that, or near a deadline?
Do you have Workers working late?
Do you work Late?
Do you Use the time you have and let people that use your product know?
Do you Delay?
This is highly dependent on the methodology you use to build software. Do you use Sprints, Kanban, SCRUM, waterfall? Do those mean anything to you?
I've used a lot of different strategies. My favorite has been product team prioritizing a backlog, and developers driving the progress. This needs to account for bugs, and bug fixing as time goes on can be a fixed-cost. E.g. our team estimates each engineer will spend 1-2 days a week fixing bugs, mistakes. This rate should go down as the team gets better at taking care of simple mistakes and building well tested software.
I don't believe in working late except in rare occasions where working late will significantly make my life and everyone's life better because of it. Rarely does it, and it usually just makes me tired and cranky and resentful.
It takes time to get to this place, because no strategy is perfect at predicting how future time will be spent and estimating what emergent work (bugs, etc) will appear.
I've worked in the industry long enough and have been fortunate to work in high-functioning teams that don't pull all nighters. That's usually seen as a failure to plan. That said, it works for some people, but it's not sustainable.
Well Spoken and Said