# getRealTime (Shared)

> Returns the computer's real date and time, in the local time zone.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Data and utilities
- **URL**: https://wiki.mymp.gg/en/getRealTime

## Syntax

```lua
table getRealTime()
```

## Returns

A table with `second`, `minute`, `hour`, `monthday` (1 to 31), `month` (0 to 11), `year` (years since 1900), `weekday` (0 = Sunday), `yearday` (0 to 365) and `timestamp` (seconds since 1970).

## Example

```lua
local now = getRealTime()
print(("%02d/%02d/%04d %02d:%02d"):format(now.monthday, now.month + 1, now.year + 1900, now.hour, now.minute))
```

### Note

`month` starts at 0 and `year` counts from 1900: add 1 and 1900 to show the date.

## See also

- [getTickCount (Shared)](https://wiki.mymp.gg/en/getTickCount.md): Returns how many milliseconds have passed since scripts started running on this side.
