Re: ntpsec as server questions
On Mon 04 Dec 2023 at 15:28:03 (-0500), 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.
If by fixed, you mean it should have changed the time zone of the
machine, you obviously didn't read the man page:
Note that tzselect will not actually change the timezone for you.
Use 'dpkg-reconfigure tzdata' to achieve this.
nor the output from the program:
$ tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", or "TZ".
1) Africa
2) Americas
3) Antarctica
4) Asia
5) Atlantic Ocean
6) Australia
7) Europe
8) Indian Ocean
9) Pacific Ocean
10) coord - I want to use geographical coordinates.
11) TZ - I want to specify the timezone using the Posix TZ format.
#? 11
Please enter the desired value of the TZ environment variable.
For example, AEST-10 is abbreviated AEST and is 10 hours
ahead (east) of Greenwich, with no daylight saving time.
EST5EDT
The following information has been given:
TZ='EST5EDT'
Therefore TZ='EST5EDT' will be used.
Selected time is now: Mon Dec 4 21:42:03 EST 2023.
Universal Time is now: Tue Dec 5 02:42:03 UTC 2023.
Is the above information OK?
1) Yes
2) No
#? 1
You can make this change permanent for yourself by appending the line
↑↑↑↑↑↑↑↑↑↑↑↑
TZ='EST5EDT'; export TZ
to the file '.profile' in your home directory; then log out and log in again.
↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
EST5EDT
$
(I've assumed you want the old value rather than America/New_York.)
Cheers,
David.
Reply to: