> 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)
}
```
