Does the DS1339A retain data when VCC and VBAT are turned off?
The DS1339A requires some power to run, it does not have inbuilt battery.
Either VCC or VBAT has to power the IC in order to retain the data when either of the source are disconnected.