[Plugin] GMT Timezone
#1

Description:
This is Timezone plugin. You can set any timezone for your SA:MP server. And some useful function.
Small example.
How to use:
pawn Код:
// Auto replacement default pawn time function
#define AUTO_SETUP
#include <gmtime>
Natives:
pawn Код:
native gm_SetTimeZone(hour = 0, minute = 0);
native gm_gettime(&hour = 0, &minute = 0, &second = 0);
native gm_getdate(&year=0, &month = 0, &day = 0, &wday = 0);

native gm_strftime(const string[], dest[], size = sizeof(dest));
native gm_timestamp();
native gm_mktime(hour, minute, second, year, month, day);
native gm_timestamp_to_date(timestamp, &hour = 0, &minute = 0, &second = 0, &year = 0, &month = 0, &day = 0);

native gm_GetMonthDay(month, year = 1990);
native gm_ConvertSeconds(time, &hour = 0, &minute = 0, &second = 0, &year = 0, &month = 0, &day = 0);
Download:
Reply
#2

Set Timezone for mysql:
pawn Код:
stock MySQLSetTimeZone(MySQL:handle, hour = 0, minute = 0)
{
    new
        string  [ 64 ]
    ;
               
    if ( hour >= 0 ) format(string, sizeof string, "SET time_zone = '+%02d:%02d'", hour, minute);
    else format(string, sizeof string, "SET time_zone = '%02d:%02d'", hour, minute);
    mysql_query(string, -1, _, handle);
}
Reply
#3

This is what i need, really useful for setting up clan wars :3 Nice job!
Reply
#4

Great job.
Reply
#5

hmm i will test it but looks good
Reply
#6

This is small example =)
Reply
#7

Quote:
Originally Posted by Fro1sha
Посмотреть сообщение
This is small example =)
it is Russian and I do not understand
Reply
#8

Quote:
Originally Posted by Skaizo
Посмотреть сообщение
it is Russian and I do not understand
Ok in English http://pastebin.com/Aj3FUHAe
Reply
#9

Russkie delayut vol6ebstvo

Nice work dude, looks pretty damn good to me.
Reply
#10

Quote:
Originally Posted by GangsTa_
Посмотреть сообщение
Russkie delayut vol6ebstvo

Nice work dude, looks pretty damn good to me.
Thanks man
Reply
#11

Great Job !
Reply
#12

It's good that we can easily calculate the date after some days, but in performance it's slightly slower than PAWN implementations.
Anyway, good plugin
Reply
#13

super job!!!
Reply
#14

This.. is.. WIN..
Reply
#15

Not working on Linux .
Reply
#16

@arYzal: You must use .so format of the plugin.
Reply
#17

already use that . . The plugin working but still using host time .
Reply
#18

Quote:
Originally Posted by arYzal
Посмотреть сообщение
already use that . . The plugin working but still using host time .
You should set for it to get worked. If you're, there would be some mistakes. Post your codes here so that we could know what's the mistake done in there.
Reply
#19

This has no effect on my linux server.
Changed timezone, even mysql timezone & nothing takes effect.


Does anybody know any other plugin that would sort this? Its really irritating having logs thats 4-5 hours infront
Reply
#20

It's not working on my server.... ( linux, but nici in localhost [Windows] not work..)
Anyone can help me? Or give another plugin that would sort this? I have 3 hours infront....
(*I know it's 1 year difference between last post and my post, but I need it.. *)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)