Operating System - HP-UX
1833772 Members
2179 Online
110063 Solutions
New Discussion

Time zone defaults to EST in HP-UX box with 11iv1

 
Ranjeet A.
Advisor

Time zone defaults to EST in HP-UX box with 11iv1

Greetings,
One of my end-user reported an error in a test server that 'date' command shows time in IST if you logged in as root and in EST with other users. I observed that users .profile is not properly executed/ shell is not initialised. So checked file permission of /etc/profile:
-r-------- 1 bin bin 2886 Nov 24 17:29 /etc/profile (somebody overwritten the file in the test server and hence Application was getting "wrong time")
It is changed to default 444 and the issue is resolved.

Now please let me know, if HP-UX saves time in UTC or EST irrespective of TIMEZONE variable??
Why date command shows

[ref: http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=988392]

---------------------------
tchtest1(root)!/ >date
Tue Nov 28 13:42:47 IST 2006
---------------------------
login: test1
Password:
Last successful login for test1: Tue Nov 28 13:41:51 IST-5:30 2006 on pts/tg
Last unsuccessful login for test1: Tue Nov 28 12:47:12 IST-5:30 2006 on pts/th
Please wait...checking for disk quotas
$ date
Tue Nov 28 03:12:24 EST 2006
$
3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: Time zone defaults to EST in HP-UX box with 11iv1

The time is saved in UTC. So once you fixed the TIMEZONE file or export TZ correctly, your dates on files should display correctly.
Ranjeet A.
Advisor

Re: Time zone defaults to EST in HP-UX box with 11iv1

But if shell is not initialised properly or TZ is not, why it is showing time in EST?
Dennis Handly
Acclaimed Contributor

Re: Time zone defaults to EST in HP-UX box with 11iv1

>But if shell is not initialised properly or TZ is not, why it is showing time in EST?

Because the original authors of UNIX were in the east coast, EST.