All Products
Search
Document Center

ApsaraDB RDS:How do I view and modify the time zone of an ApsaraDB RDS for MySQL instance?

Last Updated:Aug 24, 2023

This topic describes how to view and modify the time zone of an ApsaraDB RDS for MySQL instance.

View the time zone of an RDS instance by executing an SQL statement

  1. Connect to the RDS instance. For more information, see Use a database client or the CLI to connect to an ApsaraDB RDS for MySQL instance.

  2. Execute the following SQL statement to view the time zone of the RDS instance:

    SHOW GLOBAL VARIABLES LIKE '%time_zone%';

    An output similar to the following figure is displayed.

    View the time zone

    Note
    • system_time_zone: specifies the default time zone.

    • time_zone: specifies the current time zone.

View or modify the time zone of an RDS instance in the ApsaraDB RDS console

Important

If you modify the time zone, you must restart the RDS instance for the modification to take effect.

  1. Log on to the ApsaraDB RDS console. In the top navigation bar, select the region in which your RDS instance resides.

  2. Find your RDS instance and click the ID of the instance. In the left-side navigation pane, click Parameters.

  3. On the Editable Parameters tab of the page that appears, find the default_time_zone parameter, modify the parameter, and then click OK.

    Note

    The following figure provides an example on how to modify this parameter.

    Configure time zone

    Note

    In some cases, you can set the default_time_zone parameter to a half-hour time zone, such as +5:30. For more information about valid values of this parameter, see the Value Range column.

  4. Click Apply Changes. In the message that appears, click OK.

  5. Click the Edit History tab to view the modification status and wait until the RDS instance is restarted.

    If the value of the Status parameter changes to Already in effect, the RDS instance is restarted.

Applicable scope

  • ApsaraDB RDS for MySQL