All,
We have an interesting problem with one of our machines (It is running Windows CE 6.0, and DM3730 processor). After 49.7 days of work, the system time/date was reset, but not to the initial one, just to time and date of the previous reset of the machine. Basically it was reverted by 49.7 days.
Since this is the time after which GetTickCount rolls over, we think that implementation of GetLocalTime or GetSystemTime is based on GetTickCount. Basically, OS reads the time only during startup, and after that it only uses GetTickCount to determine the current date and time based on the initial value. This is my guess. I couldn't find the code for GetSystemTime nor GetLocalTime functions, so I'm not sure for 100%.
Please let me know it you've seen something similar, or if you have a solution for this problem.
In our case resetting the machine helped - the date and time was correct after that, and customer didn't have to do anything additional at this time, but anyway, the machine is designed to run continuously, and we don't want to reset it every 49.7 days.
Please, let me know if you have any ideas on how to solve it, and if this is a problem of the OS or BSP.
Thank you!
Zack