全部产品
Search
文档中心

云数据库 RDS:修改字符集排序规则与时区

更新时间:Dec 16, 2024

如果RDS SQL Server实例的系统字符集排序规则和时区设置与业务逻辑不符,或者应用程序需要处理多个时区的数据时,您可以通过修改数据库实例的字符集排序规则和时区配置来确保数据在不同时区之间的转换和展示准确无误。

背景信息

  • 实例默认的字符集排序规则:Chinese_PRC_CI_AS

  • 实例默认的时区:China Standard Time

  • 系统库包括mastermsdbtempdbmodel

说明
  • 关于可选择的字符集排序规则和时区,请以控制台显示为准。

  • 如果您要修改自建数据库的字符集排序规则,请使用ALTER DATABASE <自建数据库名称> COLLATE <字符集排序规则>命令。

使用限制

修改系统字符集排序规则

说明
  • 修改字符集前,请确保实例中没有任何用户创建的数据库(非系统数据库)。实例中存在用户数据库时,控制台将不显示字符集修改入口。

  • 如果删除了实例中的数据库,删除任务可能还在备实例中等待执行,为避免冲突,请确定主备实例均没有数据库后再修改字符集排序规则。

  1. 访问RDS实例列表,在上方选择地域,然后单击目标实例ID。

  2. 在左侧导航栏中单击数据库管理

  3. 数据库管理页面,单击修改系统字符集排序规则

  4. 在弹出的对话框中,设置系统字符集排序规则,单击确定

    重要

    修改字符集会重启实例,该过程将持续2~10分钟,期间实例将处于不可用状态。

  5. 您可以在实例基本信息页面查看修改后的系统数据库字符集。

    image

修改时区

  1. 访问RDS实例列表,在上方选择地域,然后单击目标实例ID。

  2. 在左侧导航栏中单击数据库管理

  3. 数据库管理页面,单击修改时区

  4. 在弹出的对话框中,设置时区,单击确定。更多详情,请参见时区与UTC偏移量对照表

    重要

    修改时区会重启实例,高可用系列和集群系列实例将停机1分钟内,基础系列实例约停机5分钟内,停机期间实例将处于不可用状态。

  5. 在弹出对话框中,再次单击确定

  6. 您可以在实例基本信息页面查看修改后的时区。

    image

时区与UTC偏移量对照表

说明

部分国家在夏令时开始和结束时,需要手动将时钟调快或调慢一小时,以切换到夏令时或返回到标准时间。夏令时(Daylight Saving Time,DST)是一种在一年特定时段内调整时钟的措施,通过将当地时间调整为比标准时间提前一小时,以此节省能源等。具体交替开始和结束日期因国家和地区而有所不同。

时区

标准时间偏移

夏令时标记

备注

Afghanistan Standard Time

(UTC+04:30)

Kabul

Alaskan Standard Time

(UTC–09:00)

DST+1小时

Alaska

Arabian Standard Time

(UTC+04:00)

Abu Dhabi, Muscat

Atlantic Standard Time

(UTC–04:00)

DST+1小时

Atlantic Time (Canada)

AUS Central Standard Time

(UTC+09:30)

Darwin

AUS Eastern Standard Time

(UTC+10:00)

DST+1小时

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)

DST+1小时

Sarajevo, Skopje, Warsaw, Zagreb

Central Pacific Standard Time

(UTC+11:00)

Solomon Islands, New Caledonia

Central Standard Time

(UTC–06:00)

DST+1小时

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)

DST+1小时

Brisbane

E. Europe Standard Time

(UTC+02:00)

DST+1小时

Chisinau

E. South America Standard Time

(UTC–03:00)

Brasilia

Eastern Standard Time

(UTC–05:00)

DST+1小时

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)

DST+1小时

Greenland

Greenwich Standard Time

(UTC)

Monrovia, Reykjavik

GTB Standard Time

(UTC+02:00)

DST+1小时

Athens, Bucharest

Hawaiian Standard Time

(UTC–10:00)

Hawaii

India 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)

DST+1小时

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)

DST+1小时

Auckland, Wellington

Newfoundland Standard Time

(UTC–03:30)

DST+1小时

Newfoundland

Pacific SA Standard Time

(UTC–03:00)

Santiago

Pacific Standard Time

(UTC–08:00)

DST+1小时

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)

DST+1小时

Indiana (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)

DST+1小时

Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna

Dateline Standard Time

(UTC-12:00)

International Date Line West

Aleutian Standard Time

(UTC-10:00)

DST+1小时

Aleutian Islands

Marquesas Standard Time

(UTC-09:30)

Marquesas Islands

Easter Island Standard Time

(UTC-06:00)

DST+1小时

Easter Island

Eastern Standard Time (Mexico)

(UTC-05:00)

Chetumal

Haiti Standard Time

(UTC-05:00)

DST+1小时

Haiti

Turks And Caicos Standard Time

(UTC-05:00)

DST+1小时

Turks and Caicos

Paraguay Standard Time

(UTC-04:00)

DST+1小时

Asuncion

Venezuela Standard Time

(UTC-04:00)

Caracas

SA Western Standard Time

(UTC-04:00)

Georgetown, La Paz, Manaus, San Juan

Tocantins Standard Time

(UTC-03:00)

DST+1小时

Araguaina

SA Eastern Standard Time

(UTC-03:00)

Cayenne, Fortaleza

Argentina Standard Time

(UTC-03:00)

City of Buenos Aires

Montevideo Standard Time

(UTC-03:00)

Montevideo

Magallanes Standard Time

(UTC-03:00)

DST+1小时

Punta Arenas

Saint Pierre Standard Time

(UTC-03:00)

DST+1小时

Saint Pierre and Miquelon

Bahia Standard Time

(UTC-03:00)

DST+1小时

Salvador

Mid-Atlantic Standard Time

(UTC-02:00)

Mid-Atlantic - Old

Azores Standard Time

(UTC-01:00)

DST+1小时

Azores

Romance Standard Time

(UTC+01:00)

DST+1小时

Brussels, Copenhagen, Madrid, Paris

Morocco Standard Time

(UTC+01:00)

DST+1小时

Casablanca

Sao Tome Standard Time

(UTC+01:00)

Sao Tome

Egypt Standard Time

(UTC+02:00)

DST+1小时

Cairo

West Bank Standard Time

(UTC+02:00)

DST+1小时

Gaza, Hebron

South Africa Standard Time

(UTC+02:00)

Harare, Pretoria

FLE Standard Time

(UTC+02:00)

DST+1小时

Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius

Israel Standard Time

(UTC+02:00)

DST+1小时

Jerusalem

Kaliningrad Standard Time

(UTC+02:00)

Kaliningrad

Sudan Standard Time

(UTC+02:00)

Khartoum

Libya Standard Time

(UTC+02:00)

DST+1小时

Tripoli

Namibia Standard Time

(UTC+02:00)

DST+1小时

Windhoek

Arabic Standard Time

(UTC+03:00)

Baghdad

Turkey Standard Time

(UTC+03:00)

Istanbul

Arab Standard Time

(UTC+03:00)

Kuwait, Riyadh

Astrakhan Standard Time

(UTC+04:00)

Astrakhan, Ulyanovsk

Azerbaijan Standard Time

(UTC+04:00)

Baku

Mauritius Standard Time

(UTC+04:00)

Port Louis

Saratov Standard Time

(UTC+04:00)

Saratov

Georgian Standard Time

(UTC+04:00)

Tbilisi

Volgograd Standard Time

(UTC+04:00)

Volgograd

Caucasus Standard Time

(UTC+04:00)

Yerevan

West Asia Standard Time

(UTC+05:00)

Ashgabat, Tashkent

Ekaterinburg Standard Time

(UTC+05:00)

Ekaterinburg

Pakistan Standard Time

(UTC+05:00)

Islamabad, Karachi

Sri Lanka Standard Time

(UTC+05:30)

Sri Jayawardenepura

Nepal Standard Time

(UTC+05:45)

Kathmandu

Bangladesh Standard Time

(UTC+06:00)

Dhaka

Omsk Standard Time

(UTC+06:00)

Omsk

Myanmar Standard Time

(UTC+06:30)

Yangon (Rangoon)

Altai Standard Time

(UTC+07:00)

Barnaul, Gorno-Altaysk

W. Mongolia Standard Time

(UTC+07:00)

DST+1小时

Hovd

North Asia Standard Time

(UTC+07:00)

Krasnoyarsk

N. Central Asia Standard Time

(UTC+07:00)

Novosibirsk

Tomsk Standard Time

(UTC+07:00)

Tomsk

North Asia East Standard Time

(UTC+08:00)

DST+1小时

Irkutsk

Singapore Standard Time

(UTC+08:00)

Kuala Lumpur, Singapore

Taipei Standard Time

(UTC+08:00)

Taipei

Ulaanbaatar Standard Time

(UTC+08:00)

Ulaanbaatar

Aus Central W. Standard Time

(UTC+08:45)

Eucla

Transbaikal Standard Time

(UTC+09:00)

Chita

Yakutsk Standard Time

(UTC+09:00)

Yakutsk

West Pacific Standard Time

(UTC+10:00)

Guam, Port Moresby

Tasmania Standard Time

(UTC+10:00)

DST+1小时

Hobart

Vladivostok Standard Time

(UTC+10:00)

DST+1小时

Vladivostok

Lord Howe Standard Time

(UTC+10:30)

DST+1小时

Lord Howe Island

Bougainville Standard Time

(UTC+11:00)

Bougainville Island

Magadan Standard Time

(UTC+11:00)

Magadan

Norfolk Standard Time

(UTC+11:00)

DST+1小时

Norfolk Island

Sakhalin Standard Time

(UTC+11:00)

Sakhalin

Fiji Standard Time

(UTC+12:00)

Fiji

Kamchatka Standard Time

(UTC+12:00)

DST+1小时

Petropavlovsk-Kamchatsky - Old

Chatham Islands Standard Time

(UTC+12:45)

DST+1小时

Chatham Islands

UTC+13

(UTC+13:00)

Coordinated Universal Time+13

Tonga Standard Time

(UTC+13:00)

Nuku'alofa

Samoa Standard Time

(UTC+13:00)

DST+1小时

Samoa

Line Islands Standard Time

(UTC+14:00)

Kiritimati Island

相关文档

通过API查询或修改系统字符集排序规则和时区。