On 12/5/23 12:21, gene heskett wrote:
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.shTo set /etc/localtime and /etc/timezone I would recommend the command that has been repeated several times in this thread:dpkg-reconfigure tzdataThat was not tried.
And won't work if you want to use a POSIX time zone
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.Both America/New_York and the ESTSEDT methods are available on this elderly buster install. tzselect outputs the America/ version.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.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.
That should not be done./etc/timezone contains the name (filespec) of the time zone not a "pointer" to the time zone file
The education of Gene continues... I've learned a lot. Thank you all. Cheers, Gene Heskett.
-- It's not easy to be me