1834200 Members
3140 Online
110066 Solutions
New Discussion

Re: Command date

 
SOLVED
Go to solution
Manuales
Super Advisor

Command date

Hi ..
server: HP-UX server1 B.11.00 U 9000/800 xxxxxxxxx unlimited-user license

i have started xntpd daemon .. i have changed (configured) /etc/TIMEZONE AS:
TZ=CST6CDT
export TZ

but .. if i'm located from "server2" and if i run a remsh command as:


/usr/bin/remsh servidor1 "uname -a;/usr/bin/date" | grep -v HP-UX

the output is a different hour:
09:09 but if i'm located into the server1 it says 01:00 ....

do i have to reboot server for taking new value about TIMEZONE file?
can i change the hour without shuting down the server?

please let me know .
Regards :0)
5 REPLIES 5
Robert-Jan Goossens
Honored Contributor
Solution

Re: Command date

Hi Manuales,

Yes it is advised to reboot your server after a system wide TIMEZONE change.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=25866

Regards,
Robert-Jan
Manuales
Super Advisor

Re: Command date

once i worked with Santa Cruz Operation and remotly i remember that only i did:

date -S

is not there something like that for hp-ux?

i do not want to reboot the server ...

OR .. something related with some daemon as networks configuration where you only restart the daemons .. is not there something like that for the hour into the server?

please let me know.
Robert-Jan Goossens
Honored Contributor

Re: Command date

Hi,

From the set_parms man page.

----
timezone
Allows the user to select a timezone based on the country of location. Also allows setting a usersupplied timezone. The system will need to be rebooted for a change to take effect.
----

Trond's answer from above thread is completly correct.

The command above will change the TIMEZONE in /etc/TZ which is read as processes start. So in order to set the timezone the system needs to be rebooted.

Robert-Jan
Manuales
Super Advisor

Re: Command date

thanks Robert .... :)
Dennis Handly
Acclaimed Contributor

Re: Command date

>if I'm located from "server2"

Is this in the same timezone?
If you want remsh to work, then you should set the TZ in the command, especially if you are in a different zone:
remsh servidor1 "TZ=$TZ date"

>date -S
>is not there something like that for hp-ux?

There is:
# date mmddhhmm
but you do NOT want to change the GMT time, just your timezone.