[Database O & M] Time Zone settings for databases (servers) and time zones in major regions of the world

Source: Internet
Author: User
Tags time zones
[What is the problem with incorrect time zone settings?] during overseas project O & M, you may encounter time zone settings. If the time zone is improperly set or the time zones of servers of the same project are inconsistent, project Data exceptions may occur. If the data table field uses the date field, the default value of the field is sysdate, and the program

[What is the problem with incorrect time zone settings?] during overseas project O & M, you may encounter time zone settings. If the time zone is improperly set or the time zones of servers of the same project are inconsistent, project Data exceptions may occur. If the data table field uses the date field, the default value of the field is sysdate, and the program

[What are the problems with improper time zone settings]

When performing O & M for overseas projects, you may encounter time zone settings. If the time zone is improperly set or the time zones of servers of the same project are inconsistent, project Data exceptions may occur.
If the data table field uses the date field, the default value of the field is sysdate, and the default value of the field is used when the program inserts a record, it may cause data exceptions. Exercise caution when modifying the time zone of the database server.

[Server time synchronization method]

# Change the time synchronization server to the required address (Windows Address is recommended, because most PCs in the world use Windows OS. According to CNZZ data, in the Chinese operating system market, Microsoft Windows still dominated the market in January 2014, with a share of 90.63%)

Physical server environment:

*/10 */usr/sbin/ntpdate-u time.windows.com;/sbin/clock-w>/tmp/clock. log

Virtual Machine environment:

*/10 */usr/sbin/ntpdate-u time.windows.com>/tmp/clock. log

[How to modify the time zone settings of an online project]

Replacing/etc/localtime will immediately take effect for the operating system. However, if the operating system runs database program software, the database will not take effect immediately. You must restart the database. Therefore, if the current database has a problem with the time zone, it is recommended to maintain the status quo or confirm with the program development, and provide a feasible solution, and then perform database maintenance and modify the time zone. Of course, for a database that has just been installed and does not have any business data, you can re-install the database after modifying the operating system time zone to ensure that the time zone of the database metadata is correct.

Remember: failure is not possible. If there is a risk of failure, and the status quo is not maintained, it is a good choice to do nothing.

[Time zone and setting method for overseas regions]

#################### Set timezone ################## ###########

# TimeZone: UTC + 8, CST

# Area: China
Ln-fs/usr/share/zoneinfo/Asia/Shanghai/etc/localtime
Sed-I's/^ ZONE. */ZONE = "Asia \/Shanghai"/G'/etc/sysconfig/clock

# TimeZone: UTC + 8, SGT
# Area: Singapore
Ln-fs/usr/share/zoneinfo/Singapore/etc/localtime
Sed-I's/^ ZONE. */ZONE = "Singapore"/G'/etc/sysconfig/clock

# TimeZone: UTC + 7, ICT
# Area: Vietnam
Ln-fs/usr/share/zoneinfo/Asia/Ho_Chi_Minh/etc/localtime
Sed-I's/^ ZONE. */ZONE = "Asia \/Ho_Chi_Minh"/G'/etc/sysconfig/clock

# TimeZone: UTC-8, PST
# Area: US, California
Ln-sf/usr/share/zoneinfo/America/Los_Angeles/etc/localtime
Sed-I's/^ ZONE. */ZONE = "America \/Los_Angeles"/G'/etc/sysconfig/clock

# TimeZone: UTC + 8, EST
# Area: Au
/Usr/share/zoneinfo/Australia/sysydney
Ln-sf/usr/share/zoneinfo/Australia/sysydney/etc/localtime
Sed-I's/^ ZONE. */ZONE = "Australia \/sysydney"/G'/etc/sysconfig/clock

# TimeZone: UTC + 1, CEST
# Area: German
Ln-fs/usr/share/zoneinfo/Europe/Berlin/etc/localtime
Sed-I's/^ ZONE. */ZONE = "Europe \/Berlin"/G'/etc/sysconfig/clock

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.