Sun Microsystems, Inc.  Oracle System Handbook - ISO 7.0 May 2018 Internal/Partner Edition
   Home | Current Systems | Former STK Products | EOL Systems | Components | General Info | Search | Feedback

Asset ID: 1-71-1931729.1
Update Date:2017-05-10
Keywords:

Solution Type  Technical Instruction Sure

Solution  1931729.1 :   Linux- How to Disable Daylight Savings Time (DST), and Modify the Timezone on Linux Based Servers  


Related Items
  • Linux OS
  •  
  • Oracle Database Appliance
  •  
  • Oracle Database - Enterprise Edition
  •  
  • Oracle Exadata Storage Server Software
  •  
Related Categories
  • PLA-Support>Infrastructure>Operating Systems and Virtualization>Operating Systems>Oracle Linux
  •  


Some countries do not follow DST changes, and need to configure their databases and Linux OS to not change as DST changes occur.
This note provides steps to take to configure the server(s) and databases so DST changes are ignored

This note includes a "Real World" example

Created from <SR 3-8434170151>

Applies to:

Linux OS - Version Enterprise Linux 3.0 to Oracle Linux 7.0 with Unbreakable Enterprise Kernel [3.8.13] [Release RHEL3 to OL7]
Oracle Exadata Storage Server Software - Version 11.2.2.2.2 to 12.1.1.1.1 [Release 11.2 to 12.1]
Oracle Database Appliance - Version All Versions to All Versions [Release All Releases]
Oracle Database - Enterprise Edition - Version 10.2.0.5 to 12.1.0.2 [Release 10.2 to 12.1]
Linux x86-64
.
.
Many countries do not follow DST changes, and by default they are configured so DST time changes alter their system times and even the DB times.

Goal


Using a real world example- list steps to make to remove the DST changes-configuration from a Linux server and databases

Solution


In this example- our customer is in Brazil, with a timezone of GST-3

OS files involved:
/etc/sysconfig/clock
/etc/localtime

If you look in the directory /usr/share/zoneinfo/Etc on the server, you will see subdirectories by country and even by timezone within the country
You need to identify what directory, and sub files for your target host

In our example- our customer is on the East coast in Brazil, GST-3:00
There are zoneinfo files which have the difference from DST hard coded:

GMT
GMT0
GMT-0
GMT+0
GMT-1
GMT+1
GMT-2
GMT+2
GMT-3
GMT+3
GMT-4
GMT+4
GMT-5
GMT+5
GMT-6
GMT+6
GMT-7
GMT+7
GMT-8
GMT+8
GMT-9
GMT+9
GMT-10
GMT+10
GMT-11
GMT+11
GMT-12
GMT+12
GMT-13
GMT-14


So- the directory/file for them would be:
/usr/share/zoneinfo/Etc/GMT-3

1.  Modify the file /etc/sysconfig/clock to read:

     ZONE="Etc/GMT-3"
     UTC=true
     ARC=false

2.  Follow these steps to correctly set the file/link /etc/localtime

     A.  # cd /etc
     B.  # rm /etc/localtime
     C.  # ln -s /usr/share/zoneinfo/Etc/GMT-3 /etc/localtime
     D.  # ls -al localtime
     E.  # date


     Step D should show the file /etc/localtime as a symbolic link to /usr/share/zoneinfo/Etc/GMT-3
     Step E should return the correct time for Brazil East- GST-3:00


3.  For databases- the only thing you have to make sure of is that the DB OS owner does not have any environmental variables of "TZ" set.
     When your databases start- if they do not see any TZ variables set- they will use the OS time as the DB time.

     A.  Connect as DB user
     B.  Run:  # env |grep -i TZ

     Step B should show nothing set at the OS as "TZ="
     If there are- then you need to modify the Oracle Db user's profile so this is unset


If you run command up2date as root , the time on the system will be set using the new timezone settings you made.
Run the command dateto see the current time and date

 





References

<NOTE:1209444.1> - How To Change Timezone for 11gR2 Grid Infrastructure
<NOTE:1641244.1> - EXADATA - Oracle Linux modifications due to Daylight Saving Time (DST)

Attachments
This solution has no attachment
  Copyright © 2018 Oracle, Inc.  All rights reserved.
 Feedback