Alternative to cvttimestamp?
#1

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.
Reply
#2

Mktime? :P
https://sampwiki.blast.hk/wiki/Useful_Functions#mktime
Reply
#3

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.
Reply
#4

Maby the SA-MP pawn libs are outdated?
Reply
#5

Topical. Need function to convert a timestamp into a date and time.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)