All Products
Search
Document Center

ApsaraDB RDS:Change the time zone for an ApsaraDB RDS for PostgreSQL instance

Last Updated:Aug 24, 2023

This topic describes how to query the time zone of your ApsaraDB RDS for PostgreSQL instances and change the time zone.

Procedure

  1. Use DMS to log on to an ApsaraDB RDS for PostgreSQL instance.
  2. In the top navigation bar, choose SQL Operations > SQL Window.
  3. Run the following command to view the supported time zones.
    select * from pg_timezone_names
  4. Run the following command to modify the time zone:
    alter role all set timezone='<time zone name>';

    Examples

    alter role all set timezone='UTC ';
  5. Run the following command to check the current time zone and check whether it has been modified:
     select * from pg_db_role_setting