How do I change the time zone for an Amazon Aurora DB cluster?

Last updated: 2020-12-21

I have an Amazon Aurora DB cluster, and I want to change the time zone. How can I do this?

Short description

In Amazon Aurora, the timezone parameter is a cluster level parameter. The parameter group provides a default time zone for the cluster. This is the default for all databases. The default value of timezone is UTC, and after you change the value of timezone, your change is applied to all the nodes in the cluster.

Note: The default_time_zone parameter refers to server time zone. You can't modify this parameter.

It's important to understand the difference between DB cluster parameter groups and DB instance parameter groups.

  • A DB parameter group acts as a container for engine configuration values that are applied to one or more DB instances. DB parameter groups apply to DB instances in both Amazon Relational Database Service (Amazon RDS) and Amazon Aurora. These configuration settings apply to properties that can vary between the DB instances in an Aurora DB cluster, such as the sizes for memory buffers.

  • A DB cluster parameter group acts as a container for engine configuration values that are applied to every DB instance in an Aurora DB cluster. For example, the Aurora shared storage model requires that every DB instance in an Aurora cluster use the same setting for parameters, such as innodb_file_per_table. So parameters that affect the physical storage layout are part of the DB cluster parameter group. The DB cluster parameter group also includes default values for all the DB instance-level parameters.


This example changes the timezone parameter to ASIA/CALCUTTA using Amazon Aurora MySQL 5.7.

1. Create a custom DB cluster parameter group. For more information, see Working with DB parameter groups.

2. Modify the dynamic parameter timezone="ASIA/CALCUTTA".

3. Attach the new DB cluster parameter group that you created to the cluster, and then manually reboot the DB cluster to apply the changes.

4. Check the time stamp of your DB instance by running the select @@time_zone command:

mysql> select @@time_zone;
| @@time_zone   |
| Asia/Calcutta |
1 row in set (0.00 sec)

Note: When you set the time zone at session level, this overrides both the database and/or parameter time zone. But, this is maintained only for the session. When you run the SET time_zone = 'Europe/Helsinki'; command, this sets the time zone for all the databases to Europe/Helsinki. The new time zone takes precedence over the parameter group time zone. A time zone set at database level overrides the parameter group time zone. A session time zone overrides both the parameter group time zone and a time zone set at database level.

Did this article help?

Do you need billing or technical support?