Post

Linux: Set System Timezone Based on your IP Address

Linux: Set System Timezone Based on your IP Address

Set system timezone based on your IP Address.

1
ln -fs /usr/share/zoneinfo/$(wget -qO - http://ip-api.com/line?fields=timezone) /etc/localtime

The more static way would be

1
ln -fs /usr/share/zoneinfo/Europe/Berlin /etc/localtime

ip-api.com

Limitations

The command depends on the availability and reliability of ip-api.com.

This post is licensed under CC BY 4.0 by the author.