Menu
Amazon Relational Database Service
User Guide (API Version 2014-10-31)

Oracle Time Zone

You can use the time zone option to change the system time zone used by your Oracle DB instance. For example, you might change the time zone of a DB instance to be compatible with an on-premises environment, or a legacy application. The time zone option changes the time zone at the host level. Changing the time zone impacts all date columns and values, including SYSDATE and SYSTIMESTAMP.

The time zone option differs from the rdsadmin_util.alter_db_time_zone command. The alter_db_time_zone command changes the time zone only for certain data types. The time zone option changes the time zone for all date columns and values. For more information about alter_db_time_zone, see Setting the Database Time Zone.

Prerequisites for Time Zone

The time zone option is a permanent and persistent option. You can't remove the option from an option group after you add it. You can't remove the option group from a DB instance after you add it. You can't modify the time zone setting of the option to a different time zone.

We strongly urge you to take a DB snapshot of your DB instance before adding the time zone option to a DB instance. By using a snapshot you can recover the DB instance if you set the time zone option incorrectly. For more information, see Creating a DB Snapshot.

We strongly urge you to test the time zone option on a test DB instance before you add it to a production DB instance. Adding the time zone option can cause problems with tables that use system date to add dates or times. You should analyze your data and applications to determine the impact of changing the time zone.

Time Zone Option Settings

Amazon RDS supports the following settings for the time zone option.

Option Setting Valid Values Description

Time Zone

One of the available time zones. For the full list, see Available Time Zones.

The new time zone for your DB instance.

Adding the Time Zone Option

The general process for adding the time zone option to a DB instance is the following:

  1. Create a new option group, or copy or modify an existing option group.

  2. Add the option to the option group.

  3. Associate the option group with the DB instance.

When you add the time zone option, a brief outage occurs while your DB instance is automatically restarted.

AWS Management Console

To add the time zone option to a DB instance

  1. Determine the option group you want to use. You can create a new option group or use an existing option group. If you want to use an existing option group, skip to the next step. Otherwise, create a custom DB option group with the following settings:

    1. For Engine choose the oracle edition for your DB instance.

    2. For Major Engine Version choose 11.2 or 12.1 for your DB instance.

    For more information, see Creating an Option Group.

  2. Add the Timezone option to the option group, and configure the option settings.

    Important

    If you add the time zone option to an existing option group that is already attached to one or more DB instances, a brief outage occurs while all the DB instances are automatically restarted.

    For more information about adding options, see Adding an Option to an Option Group. For more information about each setting, see Time Zone Option Settings.

  3. Apply the option group to a new or existing DB instance:

CLI

The following example uses the AWS CLI add-option-to-option-group command to add the Timezone option and the TIME_ZONE option setting to an option group called myoptiongroup. The time zone is set to Africa/Cairo.

For Linux, OS X, or Unix:

Copy
aws rds add-option-to-option-group \ --option-group-name "myoptiongroup" \ --options "OptionName=Timezone,OptionSettings=[{Name=TIME_ZONE,Value=Africa/Cairo}]" \ --apply-immediately

For Windows:

Copy
aws rds add-option-to-option-group ^ --option-group-name "myoptiongroup" ^ --options "OptionName=Timezone,OptionSettings=[{Name=TIME_ZONE,Value=Africa/Cairo}]" ^ --apply-immediately

Modifying Time Zone Settings

The time zone option is a permanent and persistent option. You can't remove the option from an option group after you add it. You can't remove the option group from a DB instance after you add it. You can't modify the time zone setting of the option to a different time zone. If you set the time zone incorrectly, restore a snapshot of your DB instance from before you added the time zone option.

Removing the Time Zone Option

The time zone option is a permanent and persistent option. You can't remove the option from an option group after you add it. You can't remove the option group from a DB instance after you add it. To remove the time zone option, restore a snapshot of your DB instance from before you added the time zone option.

Available Time Zones

The following values can be used for the time zone option.

Zone Time Zone

Africa

Africa/Cairo, Africa/Casablanca, Africa/Harare, Africa/Lagos, Africa/Luanda, Africa/Monrovia, Africa/Nairobi, Africa/Tripoli, Africa/Windhoek

America

America/Araguaina, America/Argentina/Buenos_Aires, America/Asuncion, America/Bogota, America/Caracas, America/Chicago, America/Chihuahua, America/Cuiaba, America/Denver, America/Detroit, America/Fortaleza, America/Godthab, America/Guatemala, America/Halifax, America/Lima, America/Los_Angeles, America/Manaus, America/Matamoros, America/Mexico_City, America/Monterrey, America/Montevideo, America/New_York, America/Phoenix, America/Santiago, America/Sao_Paulo, America/Tijuana, America/Toronto

Asia

Asia/Amman, Asia/Ashgabat, Asia/Baghdad, Asia/Baku, Asia/Bangkok, Asia/Beirut, Asia/Calcutta, Asia/Damascus, Asia/Dhaka, Asia/Hong_Kong, Asia/Irkutsk, Asia/Jakarta, Asia/Jerusalem, Asia/Kabul, Asia/Karachi, Asia/Kathmandu, Asia/Kolkata, Asia/Krasnoyarsk, Asia/Magadan, Asia/Manila, Asia/Muscat, Asia/Novosibirsk, Asia/Rangoon, Asia/Riyadh, Asia/Seoul, Asia/Shanghai, Asia/Singapore, Asia/Taipei, Asia/Tehran, Asia/Tokyo, Asia/Ulaanbaatar, Asia/Vladivostok, Asia/Yakutsk, Asia/Yerevan

Atlantic

Atlantic/Azores, Atlantic/Cape_Verde

Australia

Australia/Adelaide, Australia/Brisbane, Australia/Darwin, Australia/Eucla, Australia/Hobart, Australia/Lord_Howe, Australia/Perth, Australia/Sydney

Brazil

Brazil/DeNoronha, Brazil/East

Canada

Canada/Newfoundland, Canada/Saskatchewan

Etc

Etc/GMT-3

Europe

Europe/Amsterdam, Europe/Athens, Europe/Berlin, Europe/Dublin, Europe/Helsinki, Europe/Kaliningrad, Europe/London, Europe/Madrid, Europe/Moscow, Europe/Paris, Europe/Prague, Europe/Rome, Europe/Sarajevo

Pacific

Pacific/Apia, Pacific/Auckland, Pacific/Chatham, Pacific/Fiji, Pacific/Guam, Pacific/Honolulu, Pacific/Kiritimati, Pacific/Marquesas, Pacific/Samoa, Pacific/Tongatapu, Pacific/Wake

US

US/Alaska, US/Central, US/East-Indiana, US/Eastern, US/Pacific

UTC

UTC

Related Topics