I need to write a small application which needs to detect if the system time is changed by an another application/user and perform some action as soon as it is detected (maybe log the data that time has changed, along with info about which application/user changed it).
How can this be achieved?
- I have good programming experiences in shell script, c and beginner level in python.
- I don't need to know when it was changed, just need to know who/what changed it.
- The system uses NTP to sync the time, but it is also possible for anyone/any application to change the time(for eg: using the simple "date" command as well).