- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- UNIX time change
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
09-12-2006 08:05 PM
09-12-2006 08:05 PM
UNIX time change
Would I be using the date -u command?
I would also like to understand the UTC time format and how to change the time using this.
Do you guys know of any comprehensive UNIX manuals for beginners that would help my understanding of UNX?
Your help in this matter will be greatly appreciated guys.
Habib
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2006 08:13 PM
09-12-2006 08:13 PM
Re: UNIX time change
man date is your friend on how to change the time on your sysyem.
Please be aware that some applications (Oracle for example) are sensitive to date/time changes, especially backwards !
"Unix Unleashed"
http://docs.rinet.ru/UNIXs/
and others via web-search
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2006 08:17 PM
09-12-2006 08:17 PM
Re: UNIX time change
From "man date"
Set the date to Oct 8, 12:45 a.m.
date 10080045
They are lots of newbie guide or tutorial on internet
For example
http://www.google.com/search?q=unix+tutorial&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2006 08:18 PM
09-12-2006 08:18 PM
Re: UNIX time change
yes, to change it use date:
'date [-u] mmddhhmm'
'-u' is the option to set 'Input and output values in Coordinated Universal Time (UTC), functionally equivalent to Greenwich Mean Time (GMT), instead of in local time.'
See also 'man date' for the manual.
'-u' is not an option I use, without this option you can simply set the local time.
To learn more about HP-UX you can use:
http://www.docs.hp.com/en/5187-1843/index.html
or this forum!
HTH
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2006 08:19 PM
09-12-2006 08:19 PM
Re: UNIX time change
yes, to change it use date:
'date [-u] mmddhhmm'
'-u' is the option to set 'Input and output values in Coordinated Universal Time (UTC), functionally equivalent to Greenwich Mean Time (GMT), instead of in local time.'
See also 'man date' for the manual.
'-u' is not an option I use, without this option you can simply set the local time.
To learn more about HP-UX you can use:
http://www.docs.hp.com/en/5187-1843/index.html
or this forum!
Especially the search-function gives you much hints.
HTH
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2006 08:37 PM
09-12-2006 08:37 PM
Re: UNIX time change
itrc submits faster than I thought.
0 pts. for my first reply please.
For hp-ux 11i see also:
http://docs.hp.com/en/oshpux11i.html#Installing%20and%20Updating
There are also some books spezified here:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=221139
V.
P.S. the forum's etiquette
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=140137
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2006 09:03 PM
09-12-2006 09:03 PM
Re: UNIX time change
The date/time you specify should not be earlier than the current clock value as this can cause problems.
Carsten
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2006 10:28 PM
09-12-2006 10:28 PM
Re: UNIX time change
You should use set_parms:
# set_parms date_time
Or stop cron:
date mmddhhmm[yy]
like today
date 091312:2806
start cron.
Good Luck,
Joel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2006 10:31 PM
09-12-2006 10:31 PM
Re: UNIX time change
to stop and start cron use:
/sbin/init.d/cron stop
/sbin/init.d/cron start
Good Luck,
Joel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2006 01:48 AM
09-13-2006 01:48 AM
Re: UNIX time change
HP-UX has only one time -- UTC which is Universal Coordianated Time (UTC is the French abbreviation) but more popularly known as GMT (Greenwich Mean Time) or Zulu time. So when you type the command date -u, you see the time kept by HP-UX.
However, HP-UX is somewhat unique in that an UNLIMITED number of timezones can exist on the system at the same time. The reason is that all the time library and system calls will refer to a variable $TZ which contains a code for the timezone you'd like to see in your current environment. Be sure to read the man page for environ.
The TZ value has two basic parts, a symbolic name and an offset. The symbolic name is 3 or more characters such as PST or WST. The offset is the offset from UTC time where a + value is moving east from UTC, and a negative time is moving west. So PST8 means that the timezone called PST is 8 hours to the west of UTC and WST-3 is 3 hours to the east.
Now when you run the command: date, it is asking the system for the current time based on the current value of TZ. To see the value of TZ, type the command:
echo $TZ
Now if you know a bit about world time, you know that timezones are political and have very little to do with astronomy, the source of universal time. So there are dozens of timezones around the world, some are not even on the hour (they are offset -9 hours 30 minutes as in Central Australia). So to keep all of this staright, HP-UX has a file called /usr/lib/tztab which has some (NOT all) of the more common timezones listed, along with daylight saving adjustments if used. So to set the correct time of day, you can do it 2 ways:
1. Use UTC time and type the date command using the -u option as in: date -u 09131445
2. Make sure TZ has the correct timezone for your location, then type the date command without -u.
The TZ value is set for every user as you login by the file called /etc/TIMEZONE. You can display this file with the cat command.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2006 05:53 AM
09-13-2006 05:53 AM
Re: UNIX time change
"UTC which is Universal Coordianated Time (UTC is the French abbreviation) but more popularly known as GMT (Greenwich Mean Time) or Zulu time. "
Not quite right. GMT is based on astronomy and UTC is based on atomic clocks.
Kindly regards Kim Jensen
http://aa.usno.navy.mil/faq/docs/UT.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2006 08:55 PM
09-13-2006 08:55 PM
Re: UNIX time change
As we are correcting:
"UTC which is Universal Coordianated Time (UTC is the French abbreviation) but more popularly known as GMT (Greenwich Mean Time) or Zulu time. "
Not quite right: The French abbreviation is Temps Universel Coordonne and the abbreviation UTC is a compromise between the English CUT and the French TUC.
Greetings,
Philippe Vervoort
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2006 02:42 AM
09-14-2006 02:42 AM
Re: UNIX time change
So the reference to GMT in tztab, the date command, the library calls like gmtime, etc, are historic. Since environ man page defines the timezone name as any 3+ character string, GMT0 should be UTC0 or better yet, ATOMIC0 (those are zeros at the end of each name). The good news in HP-UX is that you can define any timezone with a custom name and custom offset from UTC. I particularly like BILLH-3:32:20
;-)
Bill Hassell, sysadmin