I updated yesterday to OS 4 on my 3GS and now my battery life is draining much quicker now. After limited use my battery level after 6 hrs is 40% when it used to be around 80%.
Try draining your battery to the point your iPhone shuts down. Let it charge up to 100%. Keep it plugged in for another hour or so. See if battery life doesn't improve. It should.
Mine seemed to be drain g faster than before but I then did a fresh restore as opposed to my restore from backup due to edge/3G connections issues and now the battery seems to be doing much better.
Try draining your battery to the point your iPhone shuts down. Let it charge up to 100%. Keep it plugged in for another hour or so. See if battery life doesn't improve. It should.