Get date online

You could do that over HTTP, first find some HTTP API service or set up your own (all you need is set date over HTTP). Still it won’t secure you from potential hacks, HTTP and any network communication can be manipulated, you would need to secure it with encryption or something like AES, so client have a public key server got private key and only server will be able to encode something that client can decrypt.

But think about it most games manage those by keeping track of player stats on server where they safly managed, if you keep that data on client they already vulnerable to simple memory hacks anyway