Time & Date
The time and date influences various parts of the game. Here you can learn more about the system.
Time
GTA V
The time is influencing the day-night cycle. The possible range the time can go is from 00h 00m 00s to 23h 59m 59s. By default the speed of time is multiplied by 30 in GTA V, which means 2 real seconds are equal to one GTA V minute (1000ms real -> 30000ms GTA V).
alt:V
By default the ingame time isn't synced across the clients and has to be synced manually. A common way to do this is to set the time and date on connect and then setting the conversation rate with the alt:V function setMsPerGameMinute.
Useful setter
- setDateTime (serverside) JS C#
- setMsPerGameMinute (clientside) JS
- setClockTime (clientside) JS
- addToClockTime (clientside) JS
- advanceClockTimeTo (clientside) JS
- pauseClock (clientside) JS
Useful getter
- getMsPerGameMinute (clientside) JS
- getClockHours (clientside) JS
- getClockMinutes (clientside) JS
- getClockSeconds (clientside) JS
- getPosixTime (clientside) JS
- getUtcTime (clientside) JS
- getLocalTime (clientside) JS
Date
GTA V
The date is influencing the clouds and the moon of the client. It has different moon phases and it seems that the moon also has libration. The stars aren't affected by the date. The index of months and days is starting with zero, which means that every day and month has to be calculated with -1 (month 0-11, days 0-30). The week starts with sunday. Note: When setting an invalid date (e.g. 2020.12.31) you may experience problems.
alt:V
By default the ingame date isn't synced across the clients and has to be synced manually. The common way is the same one as syncing the time.
Useful setter
- setDateTime (serverside) JS C#
- setMsPerGameMinute (clientside) JS
- setClockDate (clientside) JS
- pauseClock (clientside) JS
Useful getter