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

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: David Lindgren (david.lindgren_at_hogia.se.REMOVE!)
Date: 02/24/04


Date: Tue, 24 Feb 2004 08:57:50 +0100

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.



Relevant Pages

  • Re: Directory date/times
    ... >>> Is there a program or method (without resetting the system clock) of ... >>!StampIt should do it, see sig. ...
    (comp.sys.acorn.programmer)
  • How to determine if the system clock has been set back in time
    ... system clock between two times of running my application. ... that I could check the modified date of a system file which I "know" is ... Is this a good way to find out about user resetting the clock or are there ... I could look at when comparing time? ...
    (microsoft.public.dotnet.security)
  • Re: Windows Time & Date are resetting on Boot
    ... Recently I found that my pc date & time are resetting to the system clock on every boot, though I set the time after login. ... This is annoying very much as my softwares are not functioning (as they expire as of the changed time), and the SSL certificates show they are expired or invalid. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: How to determine if the system clock has been set back in time
    ... Could you get the time from a server? ... > system clock between two times of running my application. ... > Is this a good way to find out about user resetting the clock or are there ... > I could look at when comparing time? ...
    (microsoft.public.dotnet.general)