ClockClient6 outputs

getUtcTime

GET_UTC_TIME0x8117E09A19EEF4D3

The 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.

SignatureJavaScript
getUtcTime(): [
  year: number,
  month: number,
  day: number,
  hour: number,
  minute: number,
  second: number
]
SignatureLua
getUtcTime(): integer, integer, integer, integer, integer, integer

Usage

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.

#ValueTypeJavaScriptLuaDescription
1yearintnumberintegeroutput
2monthintnumberintegeroutput
3dayintnumberintegeroutput
4hourintnumberintegeroutput
5minuteintnumberintegeroutput
6secondintnumberintegeroutput

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

Open in the interactive natives reference