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

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.

thanks Oxiegen for your reply.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.