954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Server Date

Hi all.
I have a program in vb.net and with it I have an expiration Key.
I would like this key to be valid for 3 moths for example.
I don't want to use the users system.date because to prevent them from changing the date.
I there a way I could use for example a public server's date time instead.
thanks

VIPER5646
Junior Poster in Training
84 posts since Mar 2009
Reputation Points: 10
Solved Threads: 2
 

Using a public servers date and time would require that the user of your program has an active internet connection, or is on a corporate network.
Both of which seems a bit hazardous if it's unknown.

What you could do is grab the systems date and time on first install/run and store it in the userspace of the program settings.
Then you could create a method that both checks the current date and calculate time passed, and also whether or not the systems date is less than the stored date indicating that the user has set the date back.
You simply call that method once on each execution.

Oxiegen
Master Poster
715 posts since Jun 2006
Reputation Points: 87
Solved Threads: 141
 

thanks Oxiegen for your reply.

VIPER5646
Junior Poster in Training
84 posts since Mar 2009
Reputation Points: 10
Solved Threads: 2
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You