SA-MP Forums Archive
Unix timestamp for date format - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Unix timestamp for date format (/showthread.php?tid=311778)



Unix timestamp for date format - CyNiC - 18.01.2012

I know, I could have used a plugin to do this super-easily by using localtime, but would like to use a function in Pawn for aesthetic reasons, and are too much calculations that I don't understand how to do.
Don't ask why I just don't use gettime, the function is perfect but I have my reasons related to GMT.

http://pastebin.com/Uv1Abu66

The function're adding two hours, I wonder why.

It was converted from PHP to Pawn, source: http://pastebin.com/P3AvJwjb