- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: changing system time
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2008 11:25 AM
03-25-2008 11:25 AM
changing system time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2008 11:30 AM
03-25-2008 11:30 AM
Re: changing system time
At the root prompt, type:
# set_parms date
follow the bouncing prompt. Once you get it all set, look into NTP, and sync with an outside source, or another server in your organization.
Hope this helps!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2008 11:36 AM
03-25-2008 11:36 AM
Re: changing system time
Verify the true time with:
# date -u
This returns the UTC (GMT) time. Your localtime is governed by your TZ (timezone) setting. The master setting should reside in '/etc/TIMEZONE'. Individual login profiles may differ.
You should be synchronizing to an external time source with NTP to maintain a correct time.
You can reset your date by using 'date':
# date [-u] [mmddhhmm[[cc]yy]]
If you are stepping the date/time forward this is "safe". If you are adjusting backwards, you should first stop all time-sensitive processes (notably databases); adjust the time; and then restart the processes. The 'cron' daemon should also be stopped and restared if you are moving time backwards.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2008 12:02 PM
03-25-2008 12:02 PM
Re: changing system time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2008 12:13 PM
03-25-2008 12:13 PM
Re: changing system time
# date
Tue Mar 25 17:07:21 CDT 2008
# date -u
Tue Mar 25 22:07:24 UTC 2008
#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2008 01:29 PM
03-25-2008 01:29 PM
Re: changing system time
The 'date -u' command is display the time in UTC/GMT (Universal Time Coordinate / Greenwich Mean Time).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2008 01:35 PM
03-25-2008 01:35 PM
Re: changing system time
> Could you tell me please what is NTP?
NTP = Network Time Protocol
http://docs.hp.com/en/B2355-90774/ch04.html
...no server should be without it (IMHO)!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2008 05:13 PM
03-25-2008 05:13 PM
Re: changing system time
The good news is that HP-UX can provide every timezone at the same time using a variable called TZ. Your TZ value can be seen with the command:
echo $TZ
It was set when you logged in from the value stored in /etc/TIMEZONE. This file is changed when you first install your system and pick the local timezone. This TZ value is used in conjunction with /usr/lib/tztab where the rules for dozens of different timezones (not all) are located.
So if the date command (without -u) is off by hours, don't change the time until you look at the timezone, in your case CDT which means Central Daylight Saving Timezone. If this timezone is correct for your local system, then (as root) you can change the time to match your local time. NOTE: don't change time when applications are running. To be safe, reboot into single user mode and change the time there.
Now if any users login from remote sites where they have a different timezone, they can change the TZ value in their .profile to match their local time. It will not affect the system time as the TZ value is only translating the time (from UTC) based on the rules in tztab.
NTP is the most popular (and precise) tool to keep all your servers in sync. Computer clocks will drift over time and NTP will keep your system in sync with the atomic clocks all over the Internet. Setting up NTP is easy, but finding several NTP servers depends very much on your local data center. If you have network administrators, ask them about NTP servers that already exists in your company.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2008 07:47 PM
03-25-2008 07:47 PM
Re: changing system time
# date
Tue Mar 25 17:07:21 CDT 2008
# date -u
Tue Mar 25 22:07:24 UTC 2008
There is no discrepancy. You have the correct times for UTC and CDT.
I.e. a time is composed of a date, time of day and a zone.
17:07:21 CDT
22:07:24 UTC
If you are off by 2 hours, you aren't in the CDT timezone. You are either off the coast of New Jersey :-) or in PDT.
So instead of using TZ=CST6CDT, you need to use TZ=PST8PDT.
>Bill: So if the date command (without -u) is off by hours, don't change the time until you look at the timezone
From the timestamp on Lisa's reply, it seems the timezone is wrong. Unless she took longer than 6 minutes to reply or the ITRC forums were down. :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2008 08:32 PM
03-25-2008 08:32 PM
Re: changing system time
Oops, looking more closely, it looks like UTC is two hours too fast. So you'll need to pay attention to JRF's caution about going back in time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2008 10:11 AM
04-23-2008 10:11 AM
Re: changing system time
Wed Apr 23 13:30:35 EDT 2008
$ date -u
Wed Apr 23 17:30:38 UTC 2008
Actual time is 2:07PM EST.
How can I set the system clock in HP-UX 11i version2?
If I do
date [-u] [mmddhhmm[[cc]yy]]
,do I have to specify the time in UTC?
How to set the system time to Wed Apr 23 14:07:35 EDT 2008 from Wed Apr 23 17:30:38 UTC 2008 ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2008 10:42 AM
04-23-2008 10:42 AM
Re: changing system time
The obvious answer is to take the following steps:
1) Configure the system to use a valid NTP time source. This can be done with sam or on the command line.
2)Use set_parms to push the date forward but never backward. Rolling system time backward will cause Oracle databases to crash and possibly corrupt.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2008 07:33 PM
04-23-2008 07:33 PM
Re: changing system time
Wed Apr 23 13:30:35 EDT 2008
>$ date -u
Wed Apr 23 17:30:38 UTC 2008
>Actual time is 2:07PM EDT.
>How can I set the system clock in HP-UX?
>If I do
date [-u] [mmddhhmm[[cc]yy]]
>do I have to specify the time in UTC?
No, if TZ it set correct to EDT, you just use the local time.
>How to set the system time to Wed Apr 23 14:07:35 EDT 2008 from Wed Apr 23 17:30:38 UTC 2008?
This moves forward about 37 minutes, if you did it then:
# date 04231407
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2008 04:50 AM
04-24-2008 04:50 AM
Re: changing system time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2008 09:34 AM
04-24-2008 09:34 AM
Re: changing system time
date is the command for that
see man date
thanks and regards
sajjad