Reputation: 10167
I am using Windows CE 6.0 device and when I set the device time (programatically or manually), the device doesn't remember the setting when I unplug its power supply.
How can I make sure that the time settings are saved? I need to synchronize the device time with server programatically and this makes it difficult when the device power goes off.
I am guessing the problem might be with some registry settings not being persisted, but I am not sure if time is stored in these and I didn't find a way how to force to store them.
Thank you for suggestions.
EDIT: After the restart of the device, the clock doesn't reset completely, it just returns to wrong time. The time of the device after restart is always about 1 hour forward.
Upvotes: 1
Views: 4901
Reputation: 67168
If the device is losing it's time when you remove power, it's because it doesn't have a battery-backed clock or the battery for the clock is dead. Without any power, there's no way for the device to maintain time, and there's no way for you to get the device to save its time, short of adding some form of back-up power (or replacing the battery, if it has one).
EDIT
If the clock is resetting back to the system default, but only changing by hours, then that strongly indicates that it's losing the DST or timezone settings. Both of these are stored in the registry, so it's likely that your registry settings aren't persisting. This could be for a couple reasons:
Upvotes: 2