Iphone shuts off by itself

My iphone 3gs shut off by itself and wont turn back on unless i ''reboot'' it by holding both buttons. But after i do this is continues to shut off by itself after 5 minutes of being left idle???? only a week old and battery life not the issue????any help? its actually a 3gs but you dont have that as a option

It is the phone power saving mode. You should set it to maximum time if you don't want your phone to shutdown rigthway when idle. Go to phone settings do it.

No, this guy is not talking about Auto-lock. My 3GS is the same. One week old, and over the past three days has started to shut-down for no reason. It's a big problem, as it is shutting down at night, so the alarm is not sounding in the morning. Going back to the supplier for a replacement tomorrow