-
Notifications
You must be signed in to change notification settings - Fork 0
Time Module
Lucas E. da Silva edited this page Apr 13, 2026
·
2 revisions
The Time service allows you to synchronize your game with the Game Jolt server time. This is useful for time-based events, preventing local clock manipulation, or simply checking connectivity.
Fetches the current time from the Game Jolt server.
-
Returns: A dictionary containing
seconds,minutes,hours,day,month,year, andtimezone. Returns"error"if the request fails.
A helper function that uses the server time request to verify if the player has an active internet connection.
-
Returns:
trueif the server responds,falseif the connection fails.
var server_time = await GameJoltAPI.time_server()
if typeof(server_time) == TYPE_DICTIONARY:
print("Year: ", server_time.year)