Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adjusting for the default time-zone setting on RDS

We recently switched to an RDS instance and noticed that bunch of our database tasks were getting triggered 4 hours earlier than needed. On investigating further, the problem is caused by the default time-zone setting (UTC) on the RDS instance. Since this setting can not be altered, we would like to fix the issue on the code level globally across all our applications using this database instance. I tried to set the time-zone on the db instance I create to 'US/Eastern' by using

set GLOBAL time_zone = 'US/Eastern'" OR
set time_zone = 'US/Eastern'"

But that generates an error "Database error: Unknown or incorrect time zone: 'US/Eastern'"

What do you think I am doing wrong here? Does anyone has used any other solutions ?

like image 482
newbie Avatar asked Nov 15 '11 18:11

newbie


People also ask

How do I change the timezone on my RDS instance?

To modify the time zone of a new or existing RDS Oracle instance, use the “Option Group” option in the AWS Management Console. Please note that this option changes the time zone at the host level and impacts all date columns and values.

How do I change my AWS time zone?

On the AWS Elemental Server web interface, go to the Settings page and choose General. In Timezone, choose your required time zone. Choose Update.

How do I change the timezone in SQL Server?

In order to change the time zone of SQL Server you need to change it at the operating system level, changing the date time of the server.

What is RDS restore point in time?

Restoring your data creates a new Amazon RDS instance. Specify the backup you want to recover, and enter your Amazon RDS instance configuration as required. Then, click Restore to point in time. Upon completion of the restore, navigate to the Amazon RDS console to access the created database instance.


2 Answers

I did the following steps, So that I could change the timezone

  1. login to RDS and Create New Parameter Group.

  2. Edit the newly created Parameter Group

  3. Set timezone Ex:Asia/Calcutta and Save Changes

  4. Modify RDS instance, change DB's Parameter Group to newly created parameter group

  5. Save And Reboot RDS instance

like image 89
pbms Avatar answered Oct 17 '22 04:10

pbms


The time_zone setting of RDS database instances can now be modified: https://aws.amazon.com/de/premiumsupport/knowledge-center/rds-change-time-zone/

like image 28
janpio Avatar answered Oct 17 '22 06:10

janpio