# getTime (Client)

> Returns the game time on this client.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: World and weather
- **URL**: https://wiki.mymp.gg/en/getTime

## Syntax

```lua
int, int getTime()
```

## Returns

The hour (0 to 23) and the minutes (0 to 59).

## Example

```lua
local hours, minutes = getTime()
if hours >= 20 or hours < 6 then
    outputDebugString("It is night.")
end
```

## See also

- [setTime (Client)](https://wiki.mymp.gg/en/setTime.md): Changes the game time on this client. The clock keeps running from there.
- [setMinuteDuration (Client)](https://wiki.mymp.gg/en/setMinuteDuration.md): Sets how much real time one game minute lasts on this client.
- [setTimeFrozen (Client)](https://wiki.mymp.gg/en/setTimeFrozen.md): Freezes or unfreezes the game clock on this client. While frozen the time does not advance, but setTime still changes it.
