Usually, an hour is a long enough time to finish feeding your baby a bottle of formula milk. Leaving the bottle out at room temperature for longer than an hour is dangerous due to bacteria growth. Bacteria are airborne, so if the bottle is lukewarm and exposed, it is very likely that the milk will become contaminated.
If the formula bottle has been out of the fridge too long, make a new mixture for feeding and dispose of the potentially contaminated formula milk.
If you are travelling or anywhere other than your home, there are products available to minimise the risk of bacterial contamination in your baby's bottle. One solution is to buy formula milks that are ready mixed in packages. All you need is a sterilised baby bottle to pour the mixture into. If your baby refuses to drink formula at room temperature, consider using a portable bottle warmer – these warmers plug into a variety of power sources, including car lighter power sockets. Alternatively, you can start feeding your baby from unheated bottles at an early age to get them used to it.
Another method to use when travelling is to have a sterilised bottle with a screw-on section that contains the dry formula powder. All you need to add is boiling water. The bottle can then be cooled under running water to get it to a comfortable drinking temperature.