Skip to content

Time Module

Lucas E. da Silva edited this page Apr 13, 2026 · 2 revisions

⏳ Time Module

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.


🛠️ Functions

time_server() -> Variant

Fetches the current time from the Game Jolt server.

  • Returns: A dictionary containing seconds, minutes, hours, day, month, year, and timezone. Returns "error" if the request fails.

check_internet() -> bool

A helper function that uses the server time request to verify if the player has an active internet connection.

  • Returns: true if the server responds, false if the connection fails.

💡 Example Usage

Getting Server Time

var server_time = await GameJoltAPI.time_server()
if typeof(server_time) == TYPE_DICTIONARY:
    print("Year: ", server_time.year)

Clone this wiki locally