I think this is a good question to start with.
Here is an excellent article[
^] if you want to learn regarding building trial versions of software. It covers:
Where to Store the Expiration Data
How to detect system clock manipulation
You may also want to read
another piece[
^] from the same author to broaden your knowledge.
Finally, some SO discussions such as
this[
^] may also help.
[Please accept/up-vote answers or solutions that work for you to encourage others]