How to determine if the system clock has been set back in time

  • Thread starter Thread starter David Lindgren
  • Start date Start date
D

David Lindgren

Hello.

I am trying to figure out a way to determine if the user has resetted the
system clock between two times of running my application. One idea I have is
that I could check the modified date of a system file which I "know" is
changed regulary (every day) and compare that to the current time. If the
modified date is later than current time the system clock has probably been
reset.
Is this a good way to find out about user resetting the clock or are there
other (better) ways to do this? Also, anyone have a good idea of which file
I could look at when comparing time?

Thank you for helping out.

/David.
 
Could you get the time from a server? Or maybe you could just call a web
service somewhere that would return the time.
 
Unfortunately I cannot do that since it would mean that internet access is
required.

/David.
 
Back
Top