merge get+set timestamp

and change possible $when values to "always" "new" "existing"
add a test that the timestamp is current

allowing 3 seconds to prevent off-by-one-second errors
add an integration test