PDA

View Full Version : Server Time Problem.


0B3Y
24/07/2014, 07:38 AM
Hi guys, do you guys know how can i change my server time? Basically, i'm living in Indonesia and my server are hosted in France. So the time isnt same as Indonesia... What i want to do is set the server time to match as Indonesia... Is it possible? Thanks guys... Any reply would be appreciated.

Tadas
24/07/2014, 07:42 AM
I founded this link: http://forum.sa-mp.com/showthread.php?t=70445
I think than that filterscript take time from computer time not from host.

0B3Y
24/07/2014, 08:28 AM
Uhmm... So with that, the time for each players will be diffrent?

nmader
24/07/2014, 08:34 AM
new time, hour, minute, second;
gettime(hour, minute, second);
time = hour + 8;
SetWorldTime(time);
Edit the 8 until it is equal to your timezone, seeing as Indonesia has three timezones I wasn't use which was yours.

0B3Y
24/07/2014, 08:52 AM
Alright thanks man... Btw why do i cant rep someone? :/

nmader
24/07/2014, 08:58 AM
Alright thanks man... Btw why do i cant rep someone? :/

Are you clicking a star below the person's name? If so, does it show an error message? If not, can you not see it?

Vince
24/07/2014, 09:09 AM
new time, hour, minute, second;
gettime(hour, minute, second);
time = hour + 8;
SetWorldTime(time);
Edit the 8 until it is equal to your timezone, seeing as Indonesia has three timezones I wasn't use which was yours.

Except when it's 11PM in France, in which case you will end up with 31 (23 + 8) ... So all in all:
time = (hour + 8) % 24;

0B3Y
24/07/2014, 09:09 AM
Are you clicking a star below the person's name? If so, does it show an error message? If not, can you not see it?

Yes i'm clicking it... And a message appears. I wrote "thanks" And Click Approve. Done. But nothing happend with your rep. :/

Except when it's 11PM in France, in which case you will end up with 31 (23 + 8) ... So all in all:
time = (hour + 8) % 24;

Alright... Thanks for the corrections :)

nmader
24/07/2014, 09:12 AM
Except when it's 11PM in France, in which case you will end up with 31 (23 + 8) ... So all in all:
time = (hour + 8) % 24;
Genius, I didn't know you could do that so simply, thanks for correcting me as I am now smarter!
Yes i'm clicking it... And a message appears. I wrote "thanks" And Click Approve. Done. But nothing happend with your rep. :/
Don't worry about it. I'm here to help you, rather than rep, which is just a perk! :)

0B3Y
24/07/2014, 09:22 AM
Genius, I didn't know you could do that so simply, thanks for correcting me as I am now smarter!

Don't worry about it. I'm here to help you, rather than rep, which is just a perk! :)

Alrighty :D