To prevent cheating that system, you'll need a back end web server to host persistent data while the client is not running, and sync with client when they log in.
Otherwise, you might be able to do something by parsing out system time, but a user can just change that on their own system.