This commit is contained in:
deathbybandaid 2023-04-05 10:37:17 -04:00
parent 57d4348a30
commit 37b3fe3cb4

View File

@ -8,20 +8,15 @@ source "$SCRIPTDIR/common/load-defaults.sh"
get_tz() {
local tz_type="$1"
printf "$COL_LIGHT_BLUE" "* Checking Current Timezone in $tz_type"
if [ "$tz_type" == "/etc/timezone" ]; then
current_timezone=`cat /etc/timezone`
elif [ "$tz_type" == "timedatectl" ]; then
current_timezone=$(timedatectl | grep "zone" | sed -e 's/^[ ]*Time zone: \(.*\) (.*)$/\1/g')
fi
printf "$COL_LIGHT_BLUE" "* Timezone in $tz_type is set to $current_timezone"
return $current_timezone
}