There is a way to get the real date and time?
#1

I want to get the real date and time in my country but not with gettime and getdate... there is and includ or plugin?

Thanks
Reply
#2

Anyone know ?
Reply
#3

Whats wrong with GetTime and GetDate?
Reply
#4

Why you wanna use a plugin or a FS for nothing? If you'll use "gettime - getdate", it will automatically receive the info from the time of YOUR country! ^^
If you want it for a command, just post it here and I'mma combine it with the date / time for you!
Reply
#5

I have a reason that I want it .. it takes the time and the date of my computer/the linux, not the real time.
Reply
#6

Huh, what? Then switch the time of your PC (Linux, which is one of the strongest OS' ever) to the realtime of your country?
Reply
#7

pawn Код:
stock getRealTime(&hr, &min, &sec, timeDiff) {
     new Hour, Minute, Second;
     gettime(Hour, Minute, Second);
     hr = (Hour + timeDiff);
     min = Minute;
     sec = Second;
}
Usage:
If you are 1 hour behind the host, use "getRealTime(hourvariable, minutevariable, secondvariable, -1)". If you are 3 hours ahead of the host, use "getRealTime(hourvariable, minutevariable, secondvariable, 3)". If you are 8 hours behind the hose, use "getRealTime(hourvariable, minutevariable, secondvariable, -". It follows the same pattern as gettime so use it like this:
pawn Код:
new Hour, Minute, Sec;
getRealTime(Hour, Minute, Sec, -1);
printf("%d | %d | %d", Hour, Minute, Sec);
Reply
#8

Yep, that's also a good way, if you're for example 2 hours behind, it would look like this:

pawn Код:
getRealTime(Hour, Minute, Sec, -2);
The simple explanation would look like this:

pawn Код:
getRealTime(Hour, Minute, Sec, -AMOUNT_OF_TIME_BEHIND);
Reply
#9

Quote:
Originally Posted by Twisted_Insane
Посмотреть сообщение
The simple explanation would look like this:

pawn Код:
getRealTime(Hour, Minute, Sec, -AMOUNT_OF_TIME_BEHIND);
pawn Код:
getRealTime(Hour, Minute, Sec, DIFFERENCE_IN_HOURS);
Reply
#10

I want to make defender to my mode I need the real time and date only [i'ts complicated], maybe car I use HTTP? Do you sure that there are not plugin for that?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)