If the time zone of your ApsaraDB RDS for MySQL instance is different from the time zone of the region in which your workloads run or you need to calibrate the standard time of your RDS instance in Daylight Saving Time (DST) scenarios, you can change the time zone in the ApsaraDB RDS console or by calling an API operation. This topic describes how to change the time zone of an RDS instance and how to verify the change and provides the Time zones and UTC offsets table.
Scenarios
In the following scenarios, you must change the time zone of your RDS instance:
The time zone of your RDS instance is different from the time zone of the region in which your workloads run. For example, the default time zone of your RDS instance that was created before May 30, 2021 is SYSTEM, and you must change the time zone of the instance to the time zone of the region in which your workloads run.
The time changes between the daylight saving time (DST) and the winter time in the US, Canada, Australia, European countries, and other countries occur, and you must adjust the standard system time that you use. For example, the change from the winter time to the DST in the UK require that the hours provided for DST be one hour later than the winter time.
Prerequisites
An RDS instance is created. For more information, see Create an ApsaraDB RDS for MySQL instance.
Usage notes
After the time zone parameter of an RDS instance is changed, you must restart the RDS instance for the modification to take effect. We recommend that you modify the parameter of your RDS instance during off-peak hours and make sure that your application is configured to automatically reconnect to your RDS instance.
Change the time zone of an RDS instance in the ApsaraDB RDS console
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
In the left-side navigation pane, click Parameters.
On the Modifiable Parameters tab, find the default_time_zone parameter and click the icon in the Running Value column. In the dialog box that appears, change the time zone and click OK.
NoteFor more information about the valid values of the default_time_zone parameter, see Time zones and UTC offsets.
Click Apply Changes. In the dialog box that appears, select a time range and click OK.
NoteBefore the new parameter value takes effect, you can click Cancel Changes to revoke the change.
Change the time zone of an RDS instance by calling an API operation
Sample requests
This section provides an example on how to call the ModifyParameter operation to change the value of the default_time_zone parameter to +9:00.
...
// Parameter settings for API request
ModifyParameterRequest modifyParameterRequest = ModifyParameterRequest.builder()
.DBInstanceId("rm-bp1l94k5sw1zxxxxx")
.parameters("{"default_time_zone":"+9:00"}")
.forcerestart(true)
// Request-level configuration rewrite, can set Http request parameters, etc.
// .requestConfiguration(RequestConfiguration.create().setHttpHeaders(new HttpHeaders()))
.build();
...
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId": "6D698793-FC2B-5FC1-A6DF-33EDAD1AD6AB"
}
Check whether the time zone of an RDS instance is changed
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
In the left-side navigation pane, click System Parameters.
On the Edit History tab, check whether the new configuration of the time zone parameter takes effect.
Time zones and UTC offsets
Time zone | UTC offset | Remarks |
Afghanistan Standard Time | (UTC+04:30) | Kabul |
Alaskan Standard Time | (UTC-09:00) | Alaska |
Arabian Standard Time | (UTC+04:00) | Abu Dhabi, Muscat |
Atlantic Standard Time | (UTC-04:00) | Atlantic Time (Canada) |
AUS Central Standard Time | (UTC+09:30) | Darwin |
AUS Eastern Standard Time | (UTC+10:00) | Canberra, Melbourne, Sydney |
Belarus Standard Time | (UTC+03:00) | Minsk |
Canada Central Standard Time | (UTC-06:00) | Saskatchewan |
Cape Verde Standard Time | (UTC-01:00) | Cabo Verde Is. |
Cen. Australia Standard Time | (UTC+09:30) | Adelaide |
Central America Standard Time | (UTC-06:00) | Central America |
Central Asia Standard Time | (UTC+06:00) | Astana |
Central Brazilian Standard Time | (UTC-04:00) | Cuiaba |
Central Europe Standard Time | (UTC+01:00) | Belgrade, Bratislava, Budapest, Ljubljana, Prague |
Central European Standard Time | (UTC+01:00) | Sarajevo, Skopje, Warsaw, Zagreb |
Central Pacific Standard Time | (UTC+11:00) | Solomon Islands, New Caledonia |
Central Standard Time | (UTC-06:00) | Central Time (US and Canada) |
Central Standard Time (Mexico) | (UTC-06:00) | Guadalajara, Mexico City, Monterrey |
China Standard Time | (UTC+08:00) | Beijing, Chongqing, Hong Kong, Urumqi |
E. Africa Standard Time | (UTC+03:00) | Nairobi |
E. Australia Standard Time | (UTC+10:00) | Brisbane |
E. Europe Standard Time | (UTC+02:00) | Chisinau |
E. South America Standard Time | (UTC-03:00) | Brasilia |
Eastern Standard Time | (UTC-05:00) | Eastern Time (US and Canada) |
Georgian Standard Time | (UTC+04:00) | Tbilisi |
GMT Standard Time | (UTC) | Dublin, Edinburgh, Lisbon, London |
Greenland Standard Time | (UTC-03:00) | Greenland |
Greenwich Standard Time | (UTC) | Monrovia, Reykjavik |
GTB Standard Time | (UTC+02:00) | Athens, Bucharest |
Hawaiian Standard Time | (UTC-10:00) | Hawaii |
India (Closing Down) Standard Time | (UTC+05:30) | Chennai, Kolkata, Mumbai, New Delhi |
Jordan Standard Time | (UTC+02:00) | Amman |
Korea Standard Time | (UTC+09:00) | Seoul |
Middle East Standard Time | (UTC+02:00) | Beirut |
Mountain Standard Time | (UTC-07:00) | Mountain Time (US and Canada) |
Mountain Standard Time (Mexico) | (UTC-07:00) | Chihuahua, La Paz, Mazatlan |
US Mountain Standard Time | (UTC-07:00) | Arizona |
New Zealand Standard Time | (UTC+12:00) | Auckland, Wellington |
Newfoundland Standard Time | (UTC-03:30) | Newfoundland |
Pacific SA Standard Time | (UTC-03:00) | Santiago |
Pacific Standard Time | (UTC-08:00) | Pacific Time (US and Canada) |
Pacific Standard Time (Mexico) | (UTC-08:00) | Baja California |
Russian Standard Time | (UTC+03:00) | Moscow, St. Petersburg, Volgograd |
SA Pacific Standard Time | (UTC-05:00) | Bogota, Lima, Quito, Rio Branco |
SE Asia Standard Time | (UTC+07:00) | Bangkok, Hanoi, Jakarta |
China Standard Time | (UTC+08:00) | Kuala Lumpur, Singapore |
Tokyo Standard Time | (UTC+09:00) | Osaka, Sapporo, Tokyo |
US Eastern Standard Time | (UTC-05:00) | India (Closing Down)na (East) |
UTC | UTC | Coordinated Universal Time |
UTC-02 | (UTC-02:00) | Coordinated Universal Time-02 |
UTC-08 | (UTC-08:00) | Coordinated Universal Time-08 |
UTC-09 | (UTC-09:00) | Coordinated Universal Time-09 |
UTC-11 | (UTC-11:00) | Coordinated Universal Time-11 |
UTC+12 | (UTC+12:00) | Coordinated Universal Time+12 |
W. Australia Standard Time | (UTC+08:00) | Perth |
W. Central Africa Standard Time | (UTC+01:00) | West Central Africa |
W. Europe Standard Time | (UTC+01:00) | Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna |
Kathmandu Time | (UTC+5:45) | Kathmandu |
Myanmar Time | (UTC+6:30) | Rangoon, Nay Pyi Taw |
Uzbekistan Time | (UTC+5) | Lahore, Karachi, Islamabad |
Samoa Western Standard Time | (UTC+13) | Nuku Alofa, Appiah |
UTC-12 | (UTC-12) | Coordinated Universal Time-12 |
Related operations
Operation | Description |
Modifies the time zone parameter default_time_zone. |