Date() - where does it get the date from?

Windows specific forum
Seymour Clufley
Addict
Addict
Posts: 1266
Joined: Wed Feb 28, 2007 9:13 am
Location: London

Date() - where does it get the date from?

Post by Seymour Clufley »

I ask this because I'm currently making a security plugin and it is important that it gets the correct date - ie, one that can't be changed by the user.

This is because of the old trick of changing the system date to something earlier so that a time-limited program thinks it is still in its trial period.

Is there any way to get around this "trick"?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

one that can't be changed by the user
All dates can be changed by the user.
Foz
Addict
Addict
Posts: 1359
Joined: Tue Nov 13, 2007 12:42 pm
Location: Manchester, UK

Post by Foz »

Well, instead of date you can create your own internal "ticker", which is equivalent to 30 hours of usage (1 hour a day for 30 days), and as they use it, you knock off the ticker until you get to zero.
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

Re: Date() - where does it get the date from?

Post by Tranquil »

Seymour Clufley wrote:I ask this because I'm currently making a security plugin and it is important that it gets the correct date - ie, one that can't be changed by the user.

This is because of the old trick of changing the system date to something earlier so that a time-limited program thinks it is still in its trial period.

Is there any way to get around this "trick"?
If an internet connection is available you can get the actual time from a time server.
Tranquil
Post Reply