- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- changing 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-28-2003 06:56 AM
03-28-2003 06:56 AM
I should modify the system clock on my unix 10.20 machine, and adjust it according to Lebanon's summer time clock by adding one hour at midnight.
can i modify the time automatically without using a "at" command or script?
is there any file where i should modify or configure?thanks for your help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2003 07:07 AM
03-28-2003 07:07 AM
Re: changing time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2003 07:10 AM
03-28-2003 07:10 AM
Solutionecho "yes" > /tmp/yes_time
CTIME=`0328100803`
date $CTIME < /tmp/yes_time
Change the CTIME value to what you want it to be when the at job runs.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2003 07:11 AM
03-28-2003 07:11 AM
Re: changing time
Again, I strongly suspect that you have to do absolutely nothing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2003 07:13 AM
03-28-2003 07:13 AM
Re: changing time
Use # set_parms timezone
and follow your nose.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2003 07:15 AM
03-28-2003 07:15 AM
Re: changing time
man date
The prior posts however are the better way to go.
I also recommend if you have access to the Internet or an internal time server you set up ntp to maintain system time.
Here is a great thread on the subject.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf136b941255cd71190080090279cd0f9,00.html
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
03-28-2003 07:24 AM
03-28-2003 07:24 AM
Re: changing time
but i 'am not very good with timing.how can i know that the seting of TZ is correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2003 07:40 AM
03-28-2003 07:40 AM
Re: changing time
Is your TZ correct? If the outcome of date -u is right? Then your TZ is OK.
HTH
Donald
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2003 08:02 AM
03-28-2003 08:02 AM
Re: changing time
Select Africa, then unlisted then GMT+2.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2003 12:51 PM
03-28-2003 12:51 PM
Re: changing time
# Set the TIMEZONE
if [ -r /etc/TIMEZONE ]
then
. /etc/TIMEZONE
else
TZ=PST8PDT # change this for local time.
export TZ
fi
And also make sure /etc/TIMEZONE has the 7 character value for lebanon.
set_parms timezone works well also , buit I like tha manual settings as well, especially, I paste the variable above into each user's /home/user/.profile, that way there's simply no issue with time anymore, especially gleaning advice from previous postings...
good luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2003 12:26 AM
03-29-2003 12:26 AM
Re: changing time
is there any way to know that the when the system will change the time?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2003 10:29 AM
03-29-2003 10:29 AM
Re: changing time
you could run script to tail -f /var/adm/syslog/syslog.log
and grep for time and then let it email you.
that would be my solution without spending a dime.
no I am not saying there is not a tool out there that does just what you're looking for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2003 03:50 AM
03-31-2003 03:50 AM
Re: changing time
The system will *not* "change" the time, because the *system* is running in UTC (Universal Time ...) also known as GMT (Greenwich Mean Time).
What *will* change is how the system *presents* *local* time, i.e. the result of the "date" command and the localtime() and similar functions (see the ctime(3C) manual page).
Please post the content of the file /etc/TIMEZONE and give an example output from the "date" command and indicate whether the local time is correct or not.
Example:
I live in The Netherlands, also known as "Holland". We now have "summertime" (Daylight Saving Time, DST). My info is:
$ cat /etc/TIMEZONE
TZ=MET-1METDST
export TZ
$ date ; date -u
Mon Mar 31 13:41:35 METDST 2003
Mon Mar 31 11:41:35 UTC 2003
$
I.e. we are in the MET, Middle European Time, timezone. If you lookup the MET-1METDST entry in the /usr/lib/tztab file, you will see that our summertime/DST is indeed 2 hours later than UTC/GMT (and our wintertime/non-DST) is 1 hour later than UTC/GMT.
I hope this answers your questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2003 06:29 AM
03-31-2003 06:29 AM
Re: changing time
I feel I should expose this.
As already stated above: Summer time (or Daylight Saving Time - DST) is only the way how the system *interprets* its internal timer (that measures number of seconds from 1.1.1970).Once this is set correctly it should be left *untouched*. Most internal time related activity is based on the value of this (file-related dates for example).
For DST the mechanism of TimeZones should be used.You can use any of already predefined, check if any suits you:
man tztab
more /usr/lib/tztab
check also the current settimg:
echo $TZ
which is defined at the startup in the script:
/etc/TIMEZONE
(where could be adjusted if needed to make permanent).
If you won't find anything that suits you, I think you could create TimeZone for yourself. The idea, although a little bit complicated, is very well explained in man tztab.
Good luck
Adam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2003 01:40 PM
03-31-2003 01:40 PM
Re: changing time
It will show up once someone logs out and then back in and run the date command to confirm your changes took effect. No need to reboot.
-karlski