timezone error

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

timezone error

Roshan
Hi Erman,

I have noticed that the date on linux machine is not updated with ntp server.

Only on root it is in sync

-bash-4.1$ cp /usr/share/zoneinfo/Indian/Mauritius /etc/localtime
-bash-4.1$ date
Mon Mar 11 07:05:42 Local time zone must be set--see zic manual page 2019

On root is ok as shown below
[root@RHIS-TABLEAU-03 Indian]# date
Mon Mar 11 11:04:55 MUT 2019

Is there some some configs which need to be done?

Regards,

Roshan
Reply | Threaded
Open this post in threaded view
|

Re: timezone error

ErmanArslansOracleBlog
Administrator
Do you have any environment variable set in the .bash_profile (or similar files)  for non-root users?
any env variables related with time/timezone?

What is the output of ntpq -p?
Reply | Threaded
Open this post in threaded view
|

Re: timezone error

Roshan
I found the culprit.

The timezone in DB was +00:00

When I changed it to +04:00, I noticed the timezone on OS changed back to +04:00

Is there a relationship between DB timezone and OS?
Reply | Threaded
Open this post in threaded view
|

Re: timezone error

ErmanArslansOracleBlog
Administrator
You said "Only on root it is in sync "

Please send me the following outputs;

1)login to OS with root issue date command
2)login to OS with non-root user (for instance oracle), issue the date command
3)execute ntpq -p
4)connect to the database using sqlplus and issue "select  sessiontimezone from  dual;"
5)execute "select SYSTIMESTAMP from dual;"
6)execute  select dbtimezone from dual;