How to get actual time, not system time

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Jack J

If I want a timer in a game that is not impacted by a user changing their OS clock, how might this be done? For example, if I wanted to know the time in real life that has elapsed since an action was performed in hours or days. If I pull time information from the user’s OS, then the user can adjust their clock as a “hack”. This is something I would like to avoid incentivizing.

:bust_in_silhouette: Reply From: happycamper

Well if you dont want to use os clock the only other way i could think to do this is to make your own clock in game utilizing delta in _fixed_process(). delta is the time between rendered frames.

:bust_in_silhouette: Reply From: Zylann

If you want to get time without using the OS, then I guess the only way would be to do an HTTP request to some server you trust in order to get that date.
Maybe websites like have an API to do this?

However that would be a bit lame for a game to do that if it initially doesn’t need internet connection (aka not multiplayer/no remote ads/whatever online)