how would you solve this?

I want to write a simple C function, embedded in my main code, where the software
will stop on a certain date because I’m giving it to someone to test out for a month.
So let’s say the software will expire on April 24, 2009. I can easily read the date
using the date command from the OS, and stops the software on April 29, or any later date.

But if that user changes the date of his system to Jan 1, then, he can actually use
my test software as long as he wants.

Any suggestion as how you would resolve this issue?

I would think that you could store in a file somewhere in some form other then plain text. The file would contain various information like a installation timestamp, deadline timestamp, and last use timestamp. If you were to detect that the system time was modified backwards (compaired to install or last use) then something is up.

You could also check and save the timestamp of some files of the program.