LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   How to config the Time Sync automatic with Daylight Saving and NTP (https://www.linuxquestions.org/questions/solaris-opensolaris-20/how-to-config-the-time-sync-automatic-with-daylight-saving-and-ntp-756779/)

shatztal 09-21-2009 09:29 AM

How to config the Time Sync automatic with Daylight Saving and NTP
 
Hello,

I have SUNOS 5.10,
I want that the time Shifting in Winter AND Summer will change Automaticlly. in HPUX i can config it in the /ETC/TIMEZONE and /usr/lib/tztab files.

in sun OS i don't know where and how?

also to change that the Server will always get the time from an NTP Server that i specify him?

how do i do it?

Blinker_Fluid 09-21-2009 11:20 AM

It's similar in Solaris. Look at /etc/default/init (you may have a link from /etc/TIMEZONE to /etc/default/init.)

You ought to have an entry something like:
TZ=US/Mountain

the TZ you choose should have a timezone data file in /usr/share/lib/zoneinfo

(so in my example it would be in /usr/share/lib/zoneinfo/US/Mountain)

I believe you will need to reboot after configuring it.

For NTP just edit /etc/inet/ntp.conf and put in your server and make sure it's enabled for start up. (svcadm enable ntp)

shatztal 09-22-2009 03:20 AM

about hte TIMEZONE file it is alredy like you said , but still i need to automate the time shiting to make the change.
in HPUX in the TZTAB file i can write to change the time zone in a particular time and date so it will happend automaticlly when the whole country is changing the time.

how can i make it?
also the NTP file you said is a little wrong cause i looked and found ntp.client and ntp.server files.
i didn't understand how to change them and to where to ponit to?

avijitp 10-14-2009 09:22 AM

timezone package will automagically do this for you if it is a current version.

jlliagre 10-14-2009 02:51 PM

Quote:

Originally Posted by shatztal (Post 3692583)
about hte TIMEZONE file it is alredy like you said , but still i need to automate the time shiting to make the change.

As already stated, there is nothing else to do. Time changes happen when they do according to the timezone setting. This is unrelated to NTP. The TIMEZONE file is read at reboot so you need to reboot for its setting to be applied, or simply set the TZ variable in your shell to check it.
Quote:

also the NTP file you said is a little wrong cause i looked and found ntp.client and ntp.server files.
i didn't understand how to change them and to where to ponit to?
You need to create the /etc/inet/ntp.conf file.


All times are GMT -5. The time now is 08:16 PM.