mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
add ip based timezone detection
This commit is contained in:
parent
bca80745fe
commit
3d22158bd7
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ _hwclock() {
|
|||
_timezone () {
|
||||
_SET_ZONE=""
|
||||
if ping -c1 www.google.com &>/dev/null; then
|
||||
_ZONE="$(curl http://ip-api.com | grep timezone | cut -d ':' -f 2 | sed -e 's#["|,| ]##g')"
|
||||
_ZONE="$(curl http://ip-api.com/csv/?fields=timezone)"
|
||||
_SET_ZONE=1
|
||||
fi
|
||||
while [[ -z "${_SET_ZONE}" ]]; do
|
||||
|
|
Loading…
Reference in a new issue