Search code examples
c#winformsc#-3.0trialtime-trial

C# win. form - How to maintain date/time for trial


I am creating a trial version of my application.

The trial should run for a maximum of 3 days.

Recently I came to understand that it isn't that simple. As I tried to use system date to count 3 days but the user changes the current date to a past day so it increases the trial period. So, anyone can suggest how to maintain 3 days trial?

Software Development Platform : Visual Studio 2008

Language : C# (Windows Form)


Solution

  • you may try :

    save the start date. if the start date is HIGHER than current time -> exit

    or you may switch to : count the minutes the program running. over 600 ->exit (or 800 or 900)

    or you may get the time from internet, not local :

    http://www.timeapi.org/utc/now