> For the complete documentation index, see [llms.txt](https://docs.av-scripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.av-scripts.com/guides/weather-script/real-time-sync.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
