aboutsummaryrefslogtreecommitdiff
path: root/.local/share/scripts/setTime.sh
diff options
context:
space:
mode:
authorBlista Kanjo2023-05-31 11:24:18 -0400
committerBlista Kanjo2023-05-31 11:24:18 -0400
commit0ce3309087a1f6869887cf26e188b1682d9b4212 (patch)
tree2ed31c670050a789e33804aac826f3a518a697d6 /.local/share/scripts/setTime.sh
parentdc81d206dff23e9fe8eb681ecb86af6b42a07105 (diff)
feat: new dateTime application due to removal of gnome-control-center
Diffstat (limited to '.local/share/scripts/setTime.sh')
-rwxr-xr-x.local/share/scripts/setTime.sh46
1 files changed, 0 insertions, 46 deletions
diff --git a/.local/share/scripts/setTime.sh b/.local/share/scripts/setTime.sh
deleted file mode 100755
index 920e7ed..0000000
--- a/.local/share/scripts/setTime.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-
-# Prompt the user for automatic timezone setting
-echo "Do you want to automatically set the timezone based on your location? [y/n]"
-read -r automatic_timezone_input
-
-if [ "$automatic_timezone_input" = "y" ] || [ "$automatic_timezone_input" = "Y" ]; then
- # Set the system timezone automatically based on location
- automatic_timezone=$(curl --fail https://ipapi.co/timezone 2>/dev/null)
- if [ -n "$automatic_timezone" ]; then
- sudo timedatectl set-timezone "$automatic_timezone"
- echo "Automatic timezone setting complete."
- else
- echo "Automatic timezone setting failed. Please set the timezone manually."
- fi
-else
- # Prompt the user for timezone input
- echo "Enter the desired timezone (e.g., America/New_York):"
- read -r timezone_input
-
- # Set the system timezone
- sudo timedatectl set-timezone "$timezone_input"
-fi
-
-# Prompt the user for automatic time setting
-echo "Do you want to set the time automatically? [y/n]"
-read -r automatic_time_input
-
-if [ "$automatic_time_input" = "y" ] || [ "$automatic_time_input" = "Y" ]; then
- # Synchronize the system time automatically using NTP
- sudo timedatectl set-ntp true
- echo "Automatic time synchronization using NTP initiated."
-else
- # Prompt the user for date and time input
- echo "Enter the desired date (format: YYYY-MM-DD):"
- read -r date_input
- echo "Enter the desired time (format: HH:MM:SS):"
- read -r time_input
-
- # Override NTP setting
- sudo timedatectl set-ntp false
-
- # Set the system date and time
- sudo timedatectl set-time "$date_input $time_input"
- echo "Manual date and time setting complete."
-fi \ No newline at end of file