getUtcTime
GET_UTC_TIME0x8117E09A19EEF4D3The GTA V native GET_UTC_TIME of the CLOCK namespace, as LS:MP client scripts call it: the global function getUtcTime, in JavaScript and in Lua.
getUtcTime(): [
year: number,
month: number,
day: number,
hour: number,
minute: number,
second: number
]getUtcTime(): integer, integer, integer, integer, integer, integerUsage
JavaScript
const [year, month, day, hour, minute, second] = getUtcTime();Lua
local year, month, day, hour, minute, second = getUtcTime()Parameters
None. The game writes the outputs: they are handed back, not passed in.
Returns
6 values, in this order: an array in JavaScript, multiple return values in Lua.
| # | Value | Type | JavaScript | Lua | Description |
|---|---|---|---|---|---|
| 1 | year | int | number | integer | output |
| 2 | month | int | number | integer | output |
| 3 | day | int | number | integer | output |
| 4 | hour | int | number | integer | output |
| 5 | minute | int | number | integer | output |
| 6 | second | int | number | integer | output |
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Gets current UTC time
Reference
- Namespace
- Clock CLOCK
- In the game
void GET_UTC_TIME(int* year, int* month, int* day, int* hour, int* minute, int* second)- Hash
0x8117E09A19EEF4D3- Formerly
_GET_LOCAL_TIME_GET_UTC_TIME