tracking game object status over long period of time

Hello

I was wondering how to track game object status over time like in clash of clans upgrade , how do they track upgrade that needs 4 days for ex. , and prevent the player from changing the time .
Does they use server to store and track game objects status over time? which means if i am not connected to internet i can’t play .
And for virtual pet game Does they do the same ?

Hi,

I would think and handle it this way:

The Time when the “upgrade” was started and the upgrade length are saved on the server, and because of that only the server could “cheat”

And for virtual pet games, you would keep the time when you started the upgrade and the duration of the upgrade,
you could then use both to deter men how long the upgrade still needs or if its finished.

For a Virtual Pet Game you probably won’t use internet and servers, so you shut instead save the stuff to a file

Hope i could help, sorry for my bad english, im german.