1832615 Members
3173 Online
110043 Solutions
New Discussion

Re: Clock Change

 
so_2
Regular Advisor

Clock Change

I have several hp9000 based servers running hpux 11:x.
Could you advise me how do I find out whether my server automatically adjust the clock from BSt to GMT?

If not what are the steps to follow to make the time change one hour back?

If some one can apply why that will be much help ful.

Thanks in advance
s.o

6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: Clock Change

Shalom,

Generally you just chane the TZ variable.

All the time zone does is effect the display of time.

http://www.faqs.org/faqs/hp/hpux-faq/section-167.html

Generally it is a bad idea to set system clocks back. It can cause oracle crashes because transaction records are suddenly out of order.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
spex
Honored Contributor

Re: Clock Change

Hi,

# echo $TZ
if you see GMT0BST, you should be all set.

tztab(4):
# Greenwich Mean Time, British Summer Time
GMT0BST
0 3 25-31 3 1983-1984 0 BST-1
0 3 23-29 3 1985-1990 0 BST-1
0 3 25-31 3 1991-1995 0 BST-1
0 2 25-31 3 1996-2038 0 BST-1
0 1 25-31 10 1983-1985 0 GMT0
0 1 23-29 10 1986-1994 0 GMT0
0 1 18-24 10 1995 0 GMT0
0 1 25-31 10 1996-2038 0 GMT0

PCS
Bill Hassell
Honored Contributor

Re: Clock Change

HP-UX never changes time. It always maintains time as UTC (aka, GMT). Daylight saving (or British Summer Time for your location) is configured by the file /etc/TIMEZONE. Use this command:

echo $TZ

to see if your current timezone setting is GMT0BST. If so, there is nothing to do. The commands:

date
date -u

should show your current time and then GMT time. As mentioned, the TZ variable changes the representation of time to programs. The /etc/TIMEZONE file will set this variable for every login.


Bill Hassell, sysadmin
Cheryl Griffin
Honored Contributor

Re: Clock Change

Make sure that you have the latest timezone patches as well for your operating system version.

PHCO_34669 s700_800 11.23 tztab(4) cumulative patch
PHCO_34668 s700_800 11.11 tztab(4) cumulative patch
PHCO_34673 s700_800 11.00 tztab(4) cumulative patch
"Downtime is a Crime."
so_2
Regular Advisor

Re: Clock Change

Hi All

Thanks for your reply. Apologies for my delayed response.

My servers are with correct time zone.
Now I need the following things to be clarified.

1. Whether the clock chnage happens in a moment or will it change slowly( by running the clock in a different speed) ?
2. Do i need to stop my applications running?
3. Do i need to stop my cron jobs ?
4.How the application, cron jobs will be affetced if it is a sudden change?

Thanks again for your valuable replies.

s.o
James R. Ferguson
Acclaimed Contributor

Re: Clock Change

Hi:

1. There is no actual clock change. What changes is your *offset* from UTC (GMT). The manpages for 'tztahb(4)' discuss this. Unix keeps "Epoch" time --- the number of seconds elapsed since January 1, 1970. That number always increments. Your perception of the correct local time is a positive or negative offset from that ever-advancing counter.

2. You do not need to stop your applications. Standard queries for time and any logs use the ever-advancing seconds counter.

3. The 'cron' daemon handles daylight saving transitions. The manpages for 'cron(1M)' describe this quite well.

4. See the responses in #2 & #3, above.

If it helps you visualize things, do this:

# TZ=UTC date
# TZ=GMT0BST date

Note that this defines a TZ variable value only for the duration of the commandline because a *space* (whitespace) follows the variable setting and preceeds the command. There are no semicolons in the above.

Regards!

...JRF...
Regards!

...JRF...