# NETWORK::CONVERT_POSIX_TIME

- **Hash:** `0xAC97AF97FA68E5D5`
- **Namespace:** NETWORK
- **Runtime name (Lua/JS):** `ConvertPosixTime`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/NETWORK/CONVERT_POSIX_TIME

## Signature

```c
void CONVERT_POSIX_TIME(int posixTime, Any* timeStructure);
```

## Parameters

- `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

### Lua

```lua
local timeStructure = ConvertPosixTime(posixTime, timeStructure)

-- always available, by hash
local timeStructure = Citizen.InvokeNative(0xAC97AF97FA68E5D5, posixTime, Citizen.PointerValueIntInitialized(timeStructure))
```

### JavaScript

```js
const timeStructure = ConvertPosixTime(posixTime, timeStructure);

// by hash
const timeStructure = Citizen.invokeNative('0xAC97AF97FA68E5D5', posixTime, Citizen.pointerValueIntInitialized(timeStructure));
```

### C#

```csharp
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: alloc8or RDR3 NativeDB.*
