Alternative to cvttimestamp? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Alternative to cvttimestamp? (
/showthread.php?tid=157182)
Alternative to cvttimestamp? -
MasterOfQuebec - 05.07.2010
Hey,
Someone know a alternative to the cvttimestamp function? It's a native Pawn function that allows you to convert a unix timestamp that is not avaliable in SA-MP.
Quote:
cvttimestamp Convert a timestamp into a date and time
Syntax: cvttimestamp(seconds1970, &year=0, &month=0, &day=0, &hour=0, &minute=0, &second=0)
year: This will hold the year upon return.
month: This will hold the month (1–12) upon return.
day: This will hold the day of (1–31) the month upon return.
hour: This will hold the hour (0–23) upon return.
minute: This will hold the minute (0–59) upon return.
second: This will hold the second (0–59) upon return.
|
Thanks in advance.
Re: Alternative to cvttimestamp? -
Fj0rtizFredde - 05.07.2010
Mktime? :P
https://sampwiki.blast.hk/wiki/Useful_Functions#mktime
Re: Alternative to cvttimestamp? -
MasterOfQuebec - 05.07.2010
Thanks, but mktime is not the function I need.
mktime convert a date into a unix timestamp. I want to convert a unix timestamp into a date. (It may sound weird)
Also mktime is alot useless as the native gettime function returns a unix timestamp.
Re: Alternative to cvttimestamp? -
lacalau33 - 17.07.2010
Maby the SA-MP pawn libs are outdated?
Re: Alternative to cvttimestamp? -
Maccer - 16.08.2010
Topical. Need function to convert a timestamp into a date and time.