1822895 Members
3480 Online
109645 Solutions
New Discussion юеВ

System Time changing

 
rana786
Regular Advisor

System Time changing

Hi All,
2xrp7420 servers (OS HP-UX) with RAC cluster running 1 hour faster to the correct time. I need to change it to correct system time, I mean the time need to be changed backwardly. But I need to confirm before changing system time whether it needs a reboot or not?

Can anybody confirm me?

Mostafa
Walker_dhk
5 REPLIES 5
Darrel Louis
Honored Contributor

Re: System Time changing

Hi Mostafa,

Do a man on set_parms:

set_parms date_time
Allows the user to set the system date and time interactively. The change takes effect immediately.

But keep in mind that changing your system date/time has an impact on your database/application.

GL

Darrel
Yogeeraj_1
Honored Contributor

Re: System Time changing

hi mostafa,

set_parms will help you change the time settings.

i would also consider configuring a time server for efficient synchronisation.

hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
James R. Ferguson
Acclaimed Contributor

Re: System Time changing

Hi Mostafa:

Before you change anything, make sure that both servers have the same TZ (timezone) setting.

# echo ${TZ}

Since one server is 1-hour different than the other, it is conceivable that the difference you see is due to daylight saving time. Thus, in reality, the underlying time is correct; it's just the localtime that is wrong. In that case, you should change the TZ value in '/etc/TIMEZONE' to be correct.

If you are not running NTP (Network Time Protocol) you absolutely should set this up.

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: System Time changing

And to make sure that the system time (which is always GMT) is truly incorrect, do this on *BOTH* servers:

TZ=GMT0 date

If the time is identical then DON't change the time on either server. Instead, you need to set the global timezone (for all logins) to the correct timezone for your area. The global timezone is kept in /etc/TIMEZONE. One of your machines is incorrect. However, if the TIMEZONE files are both the same, then the timezone rules for Daylight Saving are mismatched. Compare the two servers this way:

grep $TZ /usr/lib/tztab

If these two line are the same, then the TZ value must be different between the two machines. The most likely culprit is .profile or an extra profile sourced by /etc/profile or $HOME/.profile. If they are different, add this statement throughout /etc/profile and $HOME/.profile for debugging:

echo "at line $LINEO, TZ=$TZ"

It's important to understand that HP-UX does not change it's system time for different timezones. Instead, time is interpreted by using $TZ as an index into the /usr/lib/tztab file. When first setting up (or reinstalling) the system, the TZ value must be set BEFORE changing the date/time. Whatever you type as a new date and time is translated by $TZ into GMT0 and the clock is set to the result.

Note that setting the time forward or backward on an active server, especially a database server, can be detgrimental to the data files that use timestamps. While you can always change the time, it is always better to shutdown all applications and databases, logout all users, fix inconsistencies with $TZ and tztab, then change the time and reboot.


Bill Hassell, sysadmin
Shahul
Esteemed Contributor

Re: System Time changing

Hi,

It looks like you have got incorrect timezone setting in one of the server. Before changing the time, check if you have got the correct time zone by

echo $TZ

if you find it's incorrect, then set proper TZ. Then you may find correct time. If still not , the you can change time by set_parms command. See man page for more details. The change will take effect immediately, but you may have some inconsistancies in some of your processes.

Best of luck
Shahul