Showing results for 
Search instead for 
Do you mean 

HP-UX time setting

SOLVED
Go to Solution
Highlighted
Regular Advisor

HP-UX time setting

Dears,

Since our contry moved into "summer clock" - 1 hour forwards, I would like to set this change in my HP-UX machine. Now the time zone is according to UTC, and there is no out source for updating the time.

BR,

Yaron
6 REPLIES
Regular Advisor

Re: HP-UX time setting

you can use:
/sbin/set_parms timezone

A list of defined timezones is in /usr/lib/tztab

you can find more info in man tztab.
Acclaimed Contributor [Founder]

Re: HP-UX time setting

You need to pick the correct timezone for your country and export TZ to that value.
See tztab(4).
Regular Advisor

Re: HP-UX time setting

Hello,

since the HP machines doesn't receive any synchronization time form out source I used set_parms date_time to define the time (UTC+3).

Then I tried ls -l command and it shows only the MM and the YY of the creation time for each file. No indication of time (Hour:Min) as was before.


I fixed the problem by using the command:

date MM/DD/HH/Mn
Yes
Ent

My questions are:

1.
How can I set the time zone without out sync source?
2.
Is there a way for ls -l to display all the following - YY/MM/DD hour:min ?

BR,

Yaron

Acclaimed Contributor [Founder]

Re: HP-UX time setting

[ Edited ]

>Then I tried ls -l command and it shows only the MM and the YY of the creation time for each file. No indication of time (Hour:Min) as was before.

This happens for:
If the time of last modification is greater than six months ago, or any time in the future, the year is substituted for the hour and minute of the modification time.

>How can I set the time zone without out sync source?

The timezone has nothing to do with NTP.

>Is there a way for ls -l to display all the following - YY/MM/DD hour:min?

This requires you to modify ls.cat:
http://h30499.www3.hp.com/t5/System-Administration/format-YYmmdd-for-ls/m-p/4523334#M367324

http://h30499.www3.hp.com/t5/System-Administration/list-file-creadted-year-using-ll-cmd/m-p/4479934#M362390

Regular Advisor

Re: HP-UX time setting

Dennis,

Do you know what should I set in the set_parms to be the Time Zone for local time which is UTC +3 hours?

I put UTC+3

Is that shuold work for good? I mean even when the local time will changed again to the "winter clock" (UTC+2)?

Acclaimed Contributor [Founder]

Re: HP-UX time setting

>Is that should work for good? I mean even when the local time will changed again to the "winter clock" (UTC+2)?

No. The only why it works for good is if you have a TZ value in /usr/lib/tztab that matches your countries particular start and stop times.
You then put that in /etc/TIMEZONE.
And make sure that "date -u" matches UTC time.