feat: set timezone function
This commit is contained in:
parent
bbd899e0d9
commit
9e3b0ac72f
1 changed files with 18 additions and 0 deletions
|
@ -10,6 +10,24 @@ convert_video_to_gif() {
|
||||||
echo "GIF created: $output_filename"
|
echo "GIF created: $output_filename"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_timezone() {
|
||||||
|
local timezone=""
|
||||||
|
local timezones_path="/usr/share/zoneinfo"
|
||||||
|
|
||||||
|
echo "Select a timezone:"
|
||||||
|
select tz_option in $timezones_path/*; do
|
||||||
|
if [[ -e $tz_option ]]; then
|
||||||
|
timezone="${tz_option##*/}"
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo "Invalid option. Please select a valid timezone."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
sudo ln -sf "$tz_option" "/etc/localtime"
|
||||||
|
echo "Timezone set to $timezone"
|
||||||
|
}
|
||||||
|
|
||||||
extract() {
|
extract() {
|
||||||
params_required "File" "Usage: extract [path/compressed_filename]" "$1"
|
params_required "File" "Usage: extract [path/compressed_filename]" "$1"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue