Jump to content
  • Advertisement
Sign in to follow this  
fluke

Getting the actual time

This topic is 3239 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

is there such a thing as a c/c++ based api that can retrieve the actual date/time/epoch rather than whatever is set by the windows system clock (which can easily be changed/wrong)? i'm trying to implement a free 30-day trial of my software, but obviously, turning back the clock makes any use of time_t useless. and preferably this wouldn't be a third party library.

Share this post


Link to post
Share on other sites
Advertisement
Don't do it based on absolute dates. Base it on a relative value that was determined the first time that the user ran your software.

EDIT: Of course, there are ways of getting the time that I really wouldn't recommend. One such is in this thread - http://www.dreamincode.net/forums/showtopic18568.htm (gets the time as given in the bios)

Share this post


Link to post
Share on other sites
Probably won't stop the most extreme hackers, but you can always secretly encrypt a log or reg key of every time the program is run and lock out the program if the current time is ever less than the last time of use. Then setting back the system clock won't defeat the trial period indefinitely.

Share this post


Link to post
Share on other sites
I don't think there is any easy solution because one can always use Sandboxie or similar programs to prevent an application from modifying anything. You will probably need something more complicated.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!