Re: Get time difference without time()
- Posted by CK Lester <cklester at yahoo.com> Mar 14, 2001
- 491 views
In this case you'd simply record the date of the install. When your program runs, you check the date of install vs. the current date... if the date of install is now AFTER the current date, delete their entire hard drive. Just kiddin' 'bout the deleting part. > >How I can get time difference without using time()? (in win32) > >But I don't want to use date() because user can change system time. > >Maybe something like time() but using win32 api calls. > > Let me guess, You are wanting to do this to prevent the > following scenario: > > Joe Blow downloads your shareware (time-limited) software. > Joe Blow sets his computer clock to 5 years ahead. > Joe Blow installs your software. > Joe Blow sets his computer clock back to normal time... > ... thus defeating your time-limit. > > The truth is, I think the user can change any time that you > can check with your program. However, if you use date() then > check to make sure that your saved-time is actually AFTER > the current time, that should prevent Joe Blow from > preventing you from preventing him from using your software > more than the specified amount of time. > > Am I wrong... anyone? > Lewis Townsend