On 12/4/23 15:28, gene heskett wrote:
On 12/4/23 07:17, Greg Wooledge wrote:
ls -hal /etc/localtime
lrwxrwxrwx 1 root root 27 Nov 1 18:21 /etc/localtime ->
/usr/share/zoneinfo/EST5EDT
And using mc to edit that link fixed it, I am now getting the correct
time from date, thank you a lot.
But maybe a bug against tzselect s/b filed, IMNSHO it should have
fixed that. It did not.
Cheers, Gene Heskett.
For gene..................................................................
#!/usr/bin/dash
#-----------------------------------------------------------------------------
# Title: timezone.sh
# Date: 2023-12-04
# Version: 1.0
# Author: poc...@columbus.rr.com
#-----------------------------------------------------------------------------
set -o errexit # exit if error...insurance ;)
set -o nounset # exit if variable not initialized
#-----------------------------------------------------------------------------
zone=EST5EDT
zoneinfo=/usr/share/zoneinfo
localtime=/etc/localtime
timezone=/etc/timezone
profile=/etc/profile.d
if [ -e "$zoneinfo"/"$zone" ];then
ln -sf "$zoneinfo"/"$zone" "$localtime"
else
printf "%s\n" "Invalid zone: $zoneinfo/$zone"
exit 1
fi
printf "%s\n" "$zone" > "$timezone"
printf "%s\n" "TZ=$zone;export TZ" > "$profile"/timezone.sh
chmod +x "$profile"/timezone.sh
#-----------------------------------------------------------------------------
chmod +x timezone.sh
sudo ./timezone.sh
--
It's not easy to be me