views:

24

answers:

2

I am developing a desktop app and it have an trial period after which application will get expire. Currently I am using system time. Since user can easily change it, I thought its not a good way to follow.

Is there any other time service that is available which I can make use of? I heard something like system clock count or something like that which cannot be easily changed by user. Can anyone put light on this?

Thanks in advance Umesh

A: 

If you don't want to trust the system clock, you are going to have problems.

Probably your best bet is an NTP or SNTP connection to establish the current time from authoritative time servers outside the organization - but you may easily be blocked by firewalls, etc.

However, that is really overkill; people don't futz with the system clock for long - it is far too much of a nuisance.

Jonathan Leffler
I am creating a offline app, so cant even think of connecting anything outside of the machine. And my bosses are too much teckies and thinks developers can magically create/calculate/evaluate applications properly even if no time source other than system time is available. :(
Umesh
In the circumstances you describe, you are stuck with the system clock; there isn't a reliable alternative. If your managers disagree, ask them to indicate what alternatives they think exist - it is always fair to ask them how to do what they ask (or, if it isn't, it is perhaps time to look elsewhere for a different job).
Jonathan Leffler
A: 

A DIY solution using SNTP SNTP time class

mikej