Operating System - HP-UX
1832964 Members
2652 Online
110048 Solutions
New Discussion

changing clock on the server

 
Adwait
Occasional Advisor

changing clock on the server

Can anybody tell me, how to change the clock on server?
7 REPLIES 7
Patrick Wallek
Honored Contributor

Re: changing clock on the server

Take the old clock off the top of the server, throw it away, and put the new clock in its place.

Now, that being said, what type of server? What operating system? Do you just want to change the time? If that is all, then you use the 'date' command, assuming this is Unix you're talking about. Have a look at the date man page for more information and instructions.

# man date
Adwait
Occasional Advisor

Re: changing clock on the server

Hi Patrick, its a HP Unix server and i want to change time on it.
Patrick Wallek
Honored Contributor

Re: changing clock on the server

OK, then use the 'date' command as I mentioned above.
whiteknight
Honored Contributor

Re: changing clock on the server

Adwait

set_parms date_time will also help

WK
Problem never ends, you must know how to fix it
Yogeeraj_1
Honored Contributor

Re: changing clock on the server

hi,
set_parms date_time

Example:

SLX2:>set_parms
Usage: set_parms
Where can be:
hostname
timezone
date_time
root_passwd
ip_address
addl_netwrk
or initial (for entire initial boot-time dialog sequence)
SLX2:>set_parms date_time
_______________________________________________________________________________

This section enables you to set the system clock.
_______________________________________________________________________________

The current system time is Wed Oct 24 10:24:04 MRU 2007

Is this correct?

Press [y] for yes or [n] for no, then press [Enter] n

_______________________________________________________________________________

You will be prompted for the date and time. Please enter all values
numerically, for example January is 1. The values in the parentheses
give the acceptable range of responses.
_______________________________________________________________________________


Please enter the last two digits of the year (00-99), then press [Enter] 07

Please enter the month (1-12), then press [Enter] 10

Please enter the date of the month (1-31), then press [Enter] 24

Please enter the hour (using 24 hour time) (0-23)
For example: For 10 in the morning enter 10, for 3 in the afternoon enter 15.
Then press [Enter]

....

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)
Matti_Kurkela
Honored Contributor

Re: changing clock on the server

...and if this is related to "Daylight Saving Time" transition (also known as "Summer/Winter time" in some countries), you *don't* change the clock for this.

Instead, the correct way is to make sure your server's time zone table has the correct rules for your timezone. If that is true, Daylight Saving Time transitions are handled automatically: there is *no need* to do anything at the OS level.

If the timezone rules need updating, you may need to restart any long lived processes, including cron, sendmail and all applications. But you can do this at any time of your choosing: you're not restricted to doing this at the exact time of the DST transition, as long as the correct rules will be in place at the time of the transition.

A. Clay Stephenson has a nice Perl script that automatically tests the timezone rules.
Since any Unix-like system uses UTC as its internal time representation, the testing method is as follows:

1.) Find the exact time of the DST transition, expressed in terms of UTC time.
Subtract one second from this UTC timestamp.
This timestamp will indicate the last second before the transition.

2.) Use the system's UTC -> local time conversion function to convert the UTC timestamp that was obtained in step 1 to local time. Display to the user and include the timezone name.

3.) Add one second to the UTC timestamp of step 1. This will be the first second after the transition.

4.) Use the system's UTC -> local time conversion function to convert the UTC timestamp of step 3 to local time. Display to the user and include the timezone name.

The user can then look at the displayed timestamps and confirm that:
- the system knows the correct time to make the transition
- the new time value will be correct (i.e. the transition happens in the correct direction)
- the timezone name of the default local time changes to match, e.g. from "EETDST" to "EET".

Note that the test *does not* involve changing the system clock at all.

If you are required to test by changing the system clock (for example, to satisfy a non-technical person who does not understand the details of Unix timekeeping), I recommend that you use "date -u" to set the system clock explicitly in terms of UTC time, since the local time is ambiguous at the autumn DST transition.

All standard warnings apply to changing the system time: always shutdown all applications before changing the time backwards.

MK
MK
Matti_Kurkela
Honored Contributor

Re: changing clock on the server