HEX
Server: Apache/2.4.59 (Debian)
System: Linux keymana 4.19.0-21-cloud-amd64 #1 SMP Debian 4.19.249-2 (2022-06-30) x86_64
User: lijunjie (1003)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //snap/core24/current/usr/share/dhcpcd/hooks/15-timezone
# Configure timezone

: ${localtime:=/etc/localtime}

set_zoneinfo()
{
	[ -z "$new_tzdb_timezone" ] && return 0

	zoneinfo_dir=
	for d in \
		/usr/share/zoneinfo	\
		/usr/lib/zoneinfo	\
		/var/share/zoneinfo	\
		/var/zoneinfo		\
	; do
		if [ -d "$d" ]; then
			zoneinfo_dir="$d"
			break
		fi
	done

	if [ -z "$zoneinfo_dir" ]; then
		syslog warning "timezone directory not found"
		return 1
	fi

	zone_file="$zoneinfo_dir/$new_tzdb_timezone"
	if [ ! -e "$zone_file" ]; then
		syslog warning "no timezone definition for $new_tzdb_timezone"
		return 1
	fi

	if copy_file "$zone_file" "$localtime"; then
		syslog info "timezone changed to $new_tzdb_timezone"
	fi
}

# For ease of use, map DHCP6 names onto our DHCP4 names
case "$reason" in
BOUND6|RENEW6|REBIND6|REBOOT6|INFORM6)
	new_tzdb_timezone="$new_dhcp6_tzdb_timezone"
	;;
esac

if $if_configured && $if_up; then
 	set_zoneinfo
fi