Cloud
AWS
rds
Isttimezone

RDS MySQL IST Timezone Setup

Purpose: Configure an RDS MySQL instance so that all queries and NOW() calls use Indian Standard Time (IST, UTC+5:30).


Steps:

1. Create a Custom DB Parameter Group

  • Go to AWS RDS Console → Parameter Groups → Create Parameter Group.

  • Set the following:

    • Parameter group family: Match your MySQL version (e.g., mysql8.0)
    • Type: DB Parameter Group
    • Name/Description: e.g., mydb-ist-timezone

2. Modify the time_zone Parameter

  • Open the newly created parameter group.
  • Search for time_zone and set its value to 'Asia/Kolkata'.
  • Save the changes.

3. Attach the Parameter Group to Your DB

  • Go to RDS → Databases → Your DB → Modify.
  • Select the custom parameter group you created.
  • Save the changes and reboot the instance for the new timezone to take effect.

4. Verify the Timezone in MySQL Run the following queries in your MySQL instance:

-- Check session/global time zone
SHOW VARIABLES LIKE 'time_zone';
 
-- Check current time (should return IST)
SELECT NOW();
 
-- Check UTC time (always returns UTC)
SELECT UTC_TIMESTAMP();

Notes:

  • NOW() will return IST.
  • UTC_TIMESTAMP() always returns UTC.
  • system_time_zone will still show UTC because the RDS OS timezone cannot be changed.

🧙 AI Wizard - Instant Page Insights

Click the button below to analyze this page.
Get an AI-generated summary and key insights in seconds.
Powered by Perplexity AI!