stefanocasazza / ULib

C++ application development framework, to help developers create and deploy applications quickly and simply
GNU Lesser General Public License v3.0
947 stars 107 forks source link

System date not updated #11

Closed msmith-techempower closed 9 years ago

msmith-techempower commented 9 years ago

Got the following error trying to run (and benchmark) ulib: userver_tcp: ERROR: 02/07/15 02:30:37 (pid 34590) System date not updated - Exiting...

What does this mean and how do I resolve it?

stefanocasazza commented 9 years ago

Hi,

it is a security mechanism to make sure to have the system date updated. It is significant especially for embedded systems (access point). In this case as the message printed have a correct date I think it is due to failure of the control that the compilation date is less than (or equal) to the date of execution, but I don't figure how that can happen. If you can, try to compile the framework before to be sure that the problem is not this...

Greetings

2015-07-02 18:07 GMT+02:00 Mike Smith notifications@github.com:

Got the following error trying to run (and benchmark) ulib: userver_tcp: ERROR: 02/07/15 02:30:37 (pid 34590) System date not updated

  • Exiting...

What does this mean and how do I resolve it?

— Reply to this email directly or view it on GitHub https://github.com/stefanocasazza/ULib/issues/11.

msmith-techempower commented 9 years ago

I can confirm that the compilation does happen before the execution. That is, the last modified date is "Jul 2 02:30", which lines up with the error message during the run.

stefanocasazza commented 9 years ago

Hi,

can you confirm that you have before the print of ERROR another similar message printed as WARNING ? userver_tcp: WARNING: 02/07/15 02:30:37 (pid 34590) System date not updated: Thu, 02 Jul 2015 18:55:14 CEST

If so the problem must be that for some reason the value returned from timegm(3) is lower than the value returned from mktime(3). If you can, try to set the TZ environment variable to UTC before the execution.

EDIT: If you want I can add in the code a time interval of acceptance (one day) to see if the problem go resolved ...

Greetings

2015-07-02 18:45 GMT+02:00 Mike Smith notifications@github.com:

I can confirm that the compilation does happen before the execution. That is, the last modified date is "Jul 2 02:30", which lines up with the error message during the run.

— Reply to this email directly or view it on GitHub https://github.com/stefanocasazza/ULib/issues/11#issuecomment-118089810.