SA-MP Forums Archive
[Plugin] GMT Timezone - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Plugin] GMT Timezone (/showthread.php?tid=263711)



GMT Timezone - Fro1sha - 23.06.2011

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:


Re: GMT Timezone - Fro1sha - 23.06.2011

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);
}



Re: GMT Timezone - Lorenc_ - 23.06.2011

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


Re: GMT Timezone - HyperZ - 23.06.2011

Great job.


Re: GMT Timezone - SpiderWalk - 23.06.2011

hmm i will test it but looks good


Re: GMT Timezone - Fro1sha - 24.06.2011

This is small example =)


Re: GMT Timezone - Skaizo - 24.06.2011

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


Re: GMT Timezone - Fro1sha - 24.06.2011

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


Re: GMT Timezone - GangsTa_ - 24.06.2011

Russkie delayut vol6ebstvo

Nice work dude, looks pretty damn good to me.


Re: GMT Timezone - Fro1sha - 24.06.2011

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

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


Re: GMT Timezone - Ricop522 - 24.06.2011

Great Job !


Re: GMT Timezone - leong124 - 25.06.2011

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


Re: GMT Timezone - JustSex - 02.07.2011

super job!!!


Re: GMT Timezone - [MM]18240[FMB] - 06.08.2013

This.. is.. WIN..


Re: GMT Timezone - arYzal - 02.03.2014

Not working on Linux .


Re: GMT Timezone - M3HR4N - 02.03.2014

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


Re: GMT Timezone - arYzal - 02.03.2014

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


Re: GMT Timezone - Lordzy - 02.03.2014

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.


Re: GMT Timezone - Johndaonee - 05.03.2014

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


Re: GMT Timezone - Hanga - 10.05.2016

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.. *)