Pumping to go out

I want to pump because I'll be out for 4 hours and it's been difficult to get him to latch on and if he gets hungry while we're out, It'd be hard to feed him. When should I pump and how long after I pump is my milk still good for without being in the fridge or freezer. Does the weather outside effect it as well. Sorry if I sound stupid I'm a FTM and my baby is a week old. Any advice please