[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ntpsec as server questions



On 12/5/23 11:38, Max Nikulin wrote:

On 05/12/2023 05:14, Pocket wrote:
For gene..................................................................
[...]
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

To set /etc/localtime and /etc/timezone I would recommend the command that has been repeated several times in this thread:

      dpkg-reconfigure tzdata

That was not tried.
And I would recommend against setting the TZ environment variable unless it is really necessary. If somebody needs it then it is better to do it in /etc/environment.d as well. KDE has its own GUI to set user-specific timezone, but I am unsure if selected value will be applied in the case of console or ssh login.

I am surprised that POSIX EST5EDT timezone has irregularities at least as it is implemented in GNU libc. I believed that it specifies just standard and summer time.

Both America/New_York and the ESTSEDT methods are available on this elderly buster install. tzselect outputs the America/ version.

In retrospect, I think making /etc/localtime a link to /etc/timezone would probably have made this endless thread moot. That would work until some update which will never happen now, deletes /etc/timezone.

The education of Gene continues... I've learned a lot.  Thank you all.

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis


Reply to: