ETOPS ("Engines Turn Or Passengers Swim") flight plans are routed so that an airport can be reached with a single operational engine in so-and-so many minutes. If both engines are out, it's going to be a water landing: https://www.travelandleisure.com/airlines-airports/etops-pla...
The longest route in the world is Singapore to Newark, 18.5 hours, so six isn't gonna get you there, but it'll get you to a safe landing.
Finally, we have two engines (in part) so you can safely lose one. Losing one engine when you've only got one is a substantially more significant emergency.
It can’t take off from a standstill with a full load of fuel and passengers with only one engine. Level (or slowly descending) flight doesn’t needs as much power.
If you normally cruise with two engines at 50% going to one engine at 100% isn’t such a stretch.
I’m not rated for a specific interval with only one leg, though. I’d really like to know how an aircraft gets certified for six hours and not, say, six and a half.
Proof of the required reliability, basically. Both showing that you've done it at a lower certification level, and actually doing demonstration flights where you run around with only one engine. Certification authorities check and make sure the required reliability is available (because having your second engine fail 5 1/2 hours from the nearest diversion airport sucks).