# Real Time Sync

If you want to synchronize the in-game time with your city or any other location, you need to obtain an API key from: <https://app.ipgeolocation.io/signup>. **The service is free.**

* Once you have your API key, go to the file `weather/editable/_api.lua` and add your key on line 1 in the `api_key` variable.
* Go to the `_config.lua` file, and in the `Config.City` option, add the region you want to sync your server with. If you're not sure about your region, check the `timezones.json` file, where you will find a list of compatible regions. If your specific region is not available (for example, you are in Barcelona, but Barcelona is not listed), use the closest zone to yours (Madrid), as it shares the same timezone.
* At to this point, our server will start with the time of the configured region. If you want to make it even more realistic, so that 1 in-game day equals 1 IRL day, you need to increase the day duration. To do this, modify the following config:

```lua
Config.DayNight = { -- default day cycle is 48 minutes
    day = 24 * 60, -- how many minutes should day last (default is 24)
    night = 24 * 60 -- how many minutes should night last (default is 24)
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.av-scripts.com/guides/weather-script/real-time-sync.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
