GetTime function
#1

Hi.

I need a function that gives me the current time in a different timezone. Now I have a function that sets the time according to the timezone... So that all works perfectly fine. but now I am trying to make a function that will give me the time so I can easily get the time of that timezone.

I dont exactly know how to make a function like this and was hoping you guys can help with this.
I need it to return the hour, minutes and seconds.

This is what I have so far:

Код:
forward GetTime(hour, minute, second);
public GetTime(hour, minute, second);
{
	gettime(hour, minute, second);
	hour-9;
	if(hour < 0)
	{
		hour+15;
	}
	else
	{
		hour-9;
	}
	return hour, minute, second;
}
Reply
#2

Why dont you let player choose the country on the beggining. Lets say for example they pick Serbia, just add +2 to their time and thats it.
Reply
#3

Quote:
Originally Posted by TwinkiDaBoss
Посмотреть сообщение
Why dont you let player choose the country on the beggining. Lets say for example they pick Serbia, just add +2 to their time and thats it.
If you've watched the Computerphile video, it's a lot more complicated than just adding or subtracting hours to the GMT.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)