From 27297b29f51f9d1b0d625993456d7b52294f0878 Mon Sep 17 00:00:00 2001 From: Yuqi Huai Date: Tue, 10 Mar 2026 23:52:51 -0700 Subject: [PATCH] fix(docker): restore timezone-based CN geo detection Detect CN geo from timezone instead of always defaulting to CN --- docker/scripts/dev_start.sh | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/docker/scripts/dev_start.sh b/docker/scripts/dev_start.sh index e7eac3645e0..21afba120a3 100755 --- a/docker/scripts/dev_start.sh +++ b/docker/scripts/dev_start.sh @@ -276,17 +276,15 @@ function check_target_arch() { function check_timezone_cn() { # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones - # time_zone=$(timedatectl | grep "Time zone" | xargs) - # time_zone=$(date +"%z") - - # for tz in "${TIMEZONE_CN[@]}"; do - # if [[ "${time_zone}" == "${tz}" ]]; then - # GEOLOC="cn" - # return 0 - # fi - # done - # disable docker.io image source - GEOLOC="cn" + time_zone=$(timedatectl | grep "Time zone" | xargs) + time_zone=$(date +"%z") + + for tz in "${TIMEZONE_CN[@]}"; do + if [[ "${time_zone}" == "${tz}" ]]; then + GEOLOC="cn" + return 0 + fi + done } function setup_devices_and_mount_local_volumes() {