I use Motion detection and a webcam as a security camera. It's headless with no internet or keyboard. To turn the camera off while it's not need I just turn the power supply off. Because I shut it down this way the time doesn't get saved onto the SD card, which I think happens on a normal shutdown?, so when I boot it up next time the time it loads off the SD card is way back to the last time I ever shut the Pi down correctly. This makes the timestamps and file names of the images Motion is storing on my USB stick double/triple/quadruple up with previous recordings and it makes it hard to sort through and some files also get overwritten.
I am wanting to know a way where a script(the one that saves the time on normal shutdowns) saves the current time of the system every 10 minutes or so, so that if the Pi looses it power and turns back on, it will continue making recording from where it previously was(within 10 minutes)(might overwrite a few minutes worth).