Timestamp UINT32_t overflowing issue

1.1k views Asked by At

I have an application where an embedded device sets an internal timestamp each day from a server request. To make things simple the server returns time in Unix Epoch for example:

1602529759 = 10/12/2020 3:08:XX EST PM

These devices report that original timestamp back and usually it is correct. However every once in a while we will get a timestamp that takes place 17 years and a few days in the future. The datestamp always seems to relate to the correct value, but in 2037. For example if todays date is 10/12/2020 the date reported by the device will be 10/17/2037 (approx). I suspect the issue is related to a binary math issue and an overflowing of the integer (a UINT32_t). I would like to determine the cause of the issue buy my bigger priority is to gain an understanding of the problem so I can correct the improperly reported values in our database.

Any ideas what might be going on here?

0

There are 0 answers