I’ve been looking at the System.DateTime class to figure this out. But that seems highly exploitable. I’m trying to figure out a system where the game checks the time since the player last opened the app, but I would like to prevent the user from just setting the time on their computer to a few hours in the future and bypassing this. Does anyone know of a work around?
If you don’t trust the user’s time, you should probably ask the time from an on-line time server, or a dedicated server of your own.