27.12.2012, 20:34
Welcome!
I want to show my new include. I think a lot of people had that problem, that s/he can't convert the famous Unix time to date. It wasn't be possible, because the SA-MP didn't insured a function for this. With this code you can convert the Unix time easily to date. (hour, and minute GMT are contain)
But let's see the code while using it:
The code will print this:
Download:
http://pastebin.com/Lzrt8jrZ
If you find any bug in the code, please post the bug in this topic, or please send me a private message!
(Sorry for the English mistake)
I want to show my new include. I think a lot of people had that problem, that s/he can't convert the famous Unix time to date. It wasn't be possible, because the SA-MP didn't insured a function for this. With this code you can convert the Unix time easily to date. (hour, and minute GMT are contain)
But let's see the code while using it:
Код:
new time = gettime(), y, mo, d, h, mi, s ; printf("Unix: %d", time); uDate(time, y, mo, d, h, mi, s); printf("%d|%d|%d|%d|%d|%d|", y, mo, d, h, mi, s);
Код:
[22:44:12] Unix: 1356471852 [22:44:12] 2012|12|25|22|44|12|
http://pastebin.com/Lzrt8jrZ
If you find any bug in the code, please post the bug in this topic, or please send me a private message!
(Sorry for the English mistake)