PDA

View Full Version : Problem with GetTime.


phoon
12/02/2014, 02:18 PM
I made a simple Time system but GetTime returns time from the computer that server is hosted.
Now the time is not correct because the computer is from another country.

Is there anyway to make a function or script that returns the correct time for players.

Pottus
12/02/2014, 02:51 PM
Easy way to do that.

gettime + (3600*(ServerGMT - HostGMT))

Server Host Adjustment
7------5-----(2*3600)
5------7-----(-2*3600)

phoon
12/02/2014, 02:53 PM
Pottus;2909608']Easy way to do that.

gettime + (3600*(HostGMT - ServerGMT))

Host

I'm sorry. I didn't understood.
Beg for a explanation, please?

Pottus
12/02/2014, 02:56 PM
Your just offsetting based on GMT find the GMT of your host and the one you want for your server then just apply the formula it will give you the correct timestamp based on the timezone of your choosing.