So a few days ago, a colleague was converting a client’s database from 10.2 single instance (on Linux) to 11.2 RAC (on Linux). Everything went smoothly. As with the source database server, the new server uses UTC time.
However he noticed that all SYSDATE functions accessed by remote clients (or by logging in from the server using sqlplus and a connect string) were off – and whilst the current time might be 17:00 UTC, the time returned by the client was 12:00 EDT.
Puzzling – there’s no timezone support for a listener which clearly is the issue here, yet the problem is from a little-known configuration file used as part of the Grid Infrastructure install.
Using “cat /proc/<pid>/environ for our listener process we saw that the process environment (derived from the configuration file below) was incorrect.
Oracle Support document 1390015.1 illustrates this problem which boils down to either editing the file shown below, or using srvctl setenv to fix the issue and then either way, bounce the clusterware.
From their note:
For 188.8.131.52 and above the TZ entry in $GRID_HOME/crs/install/s_crsconfig_<nodename>_env.txt sets to correct time zone! This enables resources started under the Grid Infrastructure home (listener, databases) using the timezone set in here and so has no requirement anymore to set TZ for DB and listener via setenv. For more details see: How To Change Timezone for 11gR2 Grid Infrastructure ( Document 1209444.1)
Nice and obscure.