Mobile: Get Date/Time from a server

I am currently working on a mobile game that forces players to wait a certain amount of time until they can play again.
I am using the node “Now” to get the current Time from the device.
But the system time can be set forward manually.
How can I prevent that type of cheating?
How do I create a server that is refreshing the Date/Time every second? Or are there public “Time Servers” which I can use?
How can i access that server in blueprints?
Do I have to use C++?

Thank you so much for any kind of answer that points me in the right direction!!

having similar cheting issues in my game;). I have made a bool variable in my save Slot, which is set to true when you click on the present, therefore you Need to Restart my game and on Event begin Play i set the value to false again. It’s not a solution- it’s just another obstacle.

Thank you for showing me this obstacle :slight_smile:
I thought about another obstacle (Or maybe you have already included this):
Most players who cheat this way will reset their device time to the present after they have gained their advantage in the game.
Therefore you could check if the time they are playing is earlier than the timestamp they have made while cheating.
So you could then take the advantage back from them.
But still this won’t prevent cheating.
But at least they need to have a wrong time on their mobile device.

I was really surprised when i looked at big titles like Candy Crush. They don’t have a server as well for their Live System.
I was able to cheat in candy crush, just by setting the time forward.
So this is just a thing we have to live with?

Hi @Tiefsignal, i know that is old but im working in something similar, but i can start with the logic, can you show me your solution?
In my case for play the game need 5 coins and need wait 15 min to gain 5 coins, but need check the time when the player close the game and give the corrects coins…
This is my stopper on my game i cant find the solution…
Thx…

PD: I know that is a old post but mayba you already have solved that. BR

I am not quite sure If I understand your question and actually I have monetized my mobile game differently now so I don’t have any of those Blueprints left. Anyway: There is no event for when the player closes your game. That wouldn’t make sense. Once the timer starts, you need to set the current time to a variable which you can get by the node “Now” and save it. Every second you compare the value from “Now” with the time you have set in the variable and give the correct amount of coins. When the player leaves the game and reopens it, load your variable and simply continue to compare. Then you will now know how much time the player waited.

But as stated in my old post this can be cheated by manually setting the time of the device forward. I guess you have to live with that.