- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to set the 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
08-29-2001 07:44 AM
08-29-2001 07:44 AM
How to set the time ?
I am working on a HP-UX 11 server. I'd like to do some tests with time data ( daylight saving time zone versus standard time zone ). I noticed you can change the system time in SAM. I can hardly believe it is that easy. Am I overlooking certain aspects ?
Thanks,
Franky Leeuwerck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 07:48 AM
08-29-2001 07:48 AM
Re: How to set the time ?
Its even easier than that;
/sbin/set_parms date_time
It will then prompt you for new date+time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 07:58 AM
08-29-2001 07:58 AM
Re: How to set the time ?
for instance... cron jobs depend on the time... if you change the time to an earlier time, then a cron job might run again... if you change the time forward, then a cron job may never run...
I hope you aren't testing with a production system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 08:00 AM
08-29-2001 08:00 AM
Re: How to set the time ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 08:07 AM
08-29-2001 08:07 AM
Re: How to set the time ?
The command is as follow :
#date mmddhhMM[[cc]yy]
mm : two positions for month
dd : two positions for day
hh : two positions for hours
MM : two positions for minutes
cc : two positions for century ( optional )
yy : two positions for years ( optional )
If you set time forward is without problems.
If you set time backword, you will be propted to confirm [Yes / No ].
Notice:
It's dangerous to play with the system time, since it's used in all process computations spacially in scheduling !
Magdi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 08:09 AM
08-29-2001 08:09 AM
Re: How to set the time ?
You can set the time of your server backwards or forwards with the 'date' command (see the man pages), BUT as already noted their are ramifications for logging and for cron tasks.
You might consider setting the timezone (TZ) variable for your testing. For example, I am in Eastern Standard Time and my TZ=EST5EDT. If, in a script, for example, I want to pretend that it is Pacific coast time, I can do this:
# TZ=PST8PDT date
There is no delimiter other than a blank between the PST8PDT and 'date'. In this fashion, the date and time returned will be Pacific time for only the duration of the command.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 08:17 AM
08-29-2001 08:17 AM
Re: How to set the time ?
I tried the tip from Stefan.
The system responded with :
The date and time have been set to: Wed Aug 29 17:54:00 METDST 2001
I assume METDST indicates Middle European Time with Daylight Saving Time. As a test, I put the time on 29 december 2001 18:00:00 and noticed Unix automatically switched to standard time instead of daylight saving time.
Sat Dec 29 18:11:00 MET 200
Which timezones can I set and how can I do it ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 08:24 AM
08-29-2001 08:24 AM
Re: How to set the time ?
Regards,
Franky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 08:50 AM
08-29-2001 08:50 AM
Re: How to set the time ?
For more information, see 'man 4 tztab'. If you list ('cat' or 'more') /usr/lib/tztab you will see the defined timezones and their transition points.
As indicated, you can set the TZ variable within a script to whatever you desire. System-wide, /etc/TIMEZONE is used to hold the default. This file is sought and sourced in /etc/profile when a login occurs.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2001 07:13 PM
08-29-2001 07:13 PM
Re: How to set the time ?
This means that anyone in any location can set TZ to match their local timezone and the machine will magically show all time values in local time. Daylght Savings time is simply a formatting task...tztab defines the rules and the time is formatted for the local rules. You can even create your own private timezone. (why heck, if politicians can do it, sysadmins should be able to do it too).
Bill Hassell, sysadmin