Operating System - HP-UX
1833159 Members
2958 Online
110051 Solutions
New Discussion

Re: Date problem : Urgent

 
SOLVED
Go to solution
SKR_1
Trusted Contributor

Date problem : Urgent

Hi All,

when i am login with root, i am getting below date

Thu Nov 20 09:40:30 IST 2008

And when i am login with oracle, different date is coming

Thu Nov 20 06:10:46 IST 2008

When i am changing date at root login to 2 hours back time, time at oracle ID also getting changed to 2 hours back.

Please let me know how its coming & how it can be resolved.

Thanks

SKR
12 REPLIES 12
Sagar Sirdesai
Trusted Contributor

Re: Date problem : Urgent

Hi SKR

Pleas check that /etc/TIMEZONE and variable TZ is set properly.

Also check if in the root's user profile TZ is set properly.
#echo $TZ

Similary check in the oracle user's profile the value of Oracle user.

There could be differently in the respective users .profile or .login file

Sagar
Suraj K Sankari
Honored Contributor

Re: Date problem : Urgent

Hi,

Please check all time zone configure at your server.
root's .profile
oracle's .profile

make it same for all

Suraj
Hein van den Heuvel
Honored Contributor

Re: Date problem : Urgent

The server timezone setting is likely wrong.
You may need: /sbin/set_parms timezone
Or just the TZ environment variable.

You may want to check metalink article 340512.1
"Timestamps & time zones - Frequently Asked Questions"

Google: +oracle +hpux +timezone +site:itrc.hp.com

"Database instance times off by one hour"
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1214063



"oracle SYSDATE is different from HPUX date"
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=56018

"Problems with Timezone"
https://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=913049

:

hth,
Hein.
SKR_1
Trusted Contributor

Re: Date problem : Urgent

Hi

echo $TZ for root is IST-5:30

&

echo $TZ for oracle is TZ=IST-2IDT

How should i change TZ for oracle permanetely.

Thanks

SKR
Sagar Sirdesai
Trusted Contributor

Re: Date problem : Urgent

Hi

I sure that TZ variable is set in either the .profile or .login file in the user oracle's home directory

Please let us know the shell the oracle user is using
SKR_1
Trusted Contributor

Re: Date problem : Urgent

Hi Sagar,

/bin/tcsh shell is using for oracle.

And there is nothing found related to TZ for oracle in .profile and .login in oracle home directory.

Thanks

SKR
Sagar Sirdesai
Trusted Contributor

Re: Date problem : Urgent

Hi
If it is tcsh shell.

Please check the file /etc/csh.cshrc and find TZ variable
Sagar
SKR_1
Trusted Contributor

Re: Date problem : Urgent

Hi Sagar,

Nothing related to TZ there in this file. For other users TZ is Same as root. Only getting problem in oracle.

Thanks

SKR
Sagar Sirdesai
Trusted Contributor
Solution

Re: Date problem : Urgent

.cshrc file because this is also used by TCSH shell

Sagar
Dennis Handly
Acclaimed Contributor

Re: Date problem : Urgent

>TZ for root is IST-5:30
>TZ for oracle is TZ=IST-2IDT

What's the intention here? I can guess IST stands for India Standard Time. What does IST-2IDT mean?
(It isn't obvious any countries starting with "I" that are in GMT+2 for Europe or Africa?)

Because of the confusion, you should NOT be using the same 3 letters in each.

Also, what does "date -u" show?

SKR_1
Trusted Contributor

Re: Date problem : Urgent

Hi Dennis,

There is a difference of three hours in both TZ variable.

root >date -u
Thu Nov 20 06:58:37 UTC 2008
root >date
Thu Nov 20 12:28:45 IST 2008
root >su - oracle
/oravl01/oracle> date
Thu Nov 20 12:29:02 IST 2008
/oravl01/oracle> date -u
Thu Nov 20 06:59:05 UTC 2008

I edited TZ in /etc/csh.login file as shell for oracle is tcsh.

Thanks

SKR
SKR_1
Trusted Contributor

Re: Date problem : Urgent

Thanks to everybody.