The value returned is based upon the time that is set on the device. I unfortunately don't know what happens in the event that the battery completely dies. I know that if it is an iPhone the time will be re-synced by the cell network, as for an iPod I suspect the next time it is connected to a computer the time will be re-synced as well. I know for a fact that as long as there is battery power the time will be kept up-to-date even if the device has been turned off.
I should also mention that this value is not a constant, but rather another way to measure the current time. the value returned is the current date and time as the number of seconds that have elapsed since Jan. 1 2001. Just to emphasize, this value is 100% dependant on the time set on the device and therefore will only be as accurate as that. There is no way to ensure that the time set on the device is 100% accurate but one can probably safely assume that it will be relatively so.