CONVERT_POSIX_TIME
Takes the specified time and writes it to the structure specified in the second argument.
Hash
0xAC97AF97FA68E5D5Runtime name
ConvertPosixTimeNamespaceNETWORK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0xAC97AF97FA68E5D5Signature
void CONVERT_POSIX_TIME(int posixTime, Any* timeStructure);Parameters
| Name | Type | Description |
|---|---|---|
posixTime | int | — |
timeStructure | Any* | — |
Returns void
Description
Takes the specified time and writes it to the structure specified in the second argument.
struct date_time
{
int year;
int PADDING1;
int month;
int PADDING2;
int day;
int PADDING3;
int hour;
int PADDING4;
int minute;
int PADDING5;
int second;
int PADDING6;
};Usage
local timeStructure = ConvertPosixTime(posixTime, timeStructure)
-- always works, by hash
local timeStructure = Citizen.InvokeNative(0xAC97AF97FA68E5D5, posixTime, Citizen.PointerValueIntInitialized(timeStructure))JavaScript and C#
const timeStructure = ConvertPosixTime(posixTime, timeStructure);
// by hash
const timeStructure = Citizen.invokeNative('0xAC97AF97FA68E5D5', posixTime, Citizen.pointerValueIntInitialized(timeStructure));var timeStructure = new OutputArgument();
Function.Call((Hash)0xAC97AF97FA68E5D5, posixTime, timeStructure);
// timeStructure.GetResult<int>()- The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
Any*arguments are often structs. Build them with a DataView buffer and pass it with:Buffer()— see the examples and notes below.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.