CentOS Time zone settings

Source: Internet
Author: User

[Email protected] logs]# Tzselect
Please identify a, so, time zone rules can be set correctly.
Please select a continent or ocean.
1) Africa
2) Americas
3) Antarctica
4) Arctic Ocean
5) Asia
6) Atlantic Ocean
7) Australia
8) Europe
9) Indian Ocean
Pacific Ocean
One) None-i want to specify the time zone using the Posix TZ format.
#? 5
Please select a country.
1) Afghanistan Israel) Palestine
2) Armenia Japan) Philippines
3) Azerbaijan Jordan PNs) Qatar
4) Bahrain Kazakhstan) Russia
5) Bangladesh Korea (north), Saudi Arabia
6) Korea (south) Bhutan) Singapore
7) Brunei Kuwait) Sri Lanka
8) Cambodia Kyrgyzstan) Syria
9) Laos) Taiwan
(Cyprus) Lebanon) Tajikistan
(one) East Timor) Macau Thailand
(Georgia) Malaysia) Turkmenistan
Hong Kong) Mongolia Arab Emirates
India) Myanmar (Burma) Uzbekistan
(Indonesia) Nepal) Vietnam
Iran) Oman Yemen
() Iraq) Pakistan
#? 9
Please select one of the following time zone regions.
1) East China-beijing, Guangdong, Shanghai, etc.
2) Heilongjiang (except Mohe), Jilin
3) Central China-sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc.
4) Most of Tibet & Xinjiang
5) West Tibet & Xinjiang
#? 1

The following information has been given:

China
East China-beijing, Guangdong, Shanghai, etc.

Therefore tz= ' Asia/shanghai ' would be used.
Local time is Now:sat Nov 08:38:21 CST 2014.
Universal time is Now:sat Nov 00:38:21 UTC 2014.
is the above information OK?
1) Yes
2) No
#? 1

You can make the permanent to yourself by appending the line
tz= ' Asia/shanghai '; Export TZ
To the file '. Profiles ' in your home directory; Then logs out and logs in again.

Here is the TZ value again, this time
can use The/usr/bin/tzselect command in shell scripts:
Asia/shanghai

[Email protected] logs]#/usr/sbin/ntpdate 58.68.228.43
06:41:55 ntpdate[48506]: Step time Server 58.68.228.43 offset-46703.849158 sec
[[Email protected] logs]# Date
Fri 06:41:58 EST 2014
[Email protected] logs]# date-s 19:40
Fri 19:40:00 EST 2014
[Email protected] logs]# date-s 19:41
Fri 19:41:00 EST 2014
[[Email protected] logs]# Date
Fri 19:41:02 EST 2014
[Email protected] logs]# date-r
Fri, 2014 19:41:07-0500
[Email protected] logs]# Hwclock--show
Fri 06:42:56 AM EST-0.091356 seconds
[Email protected] logs]# hwclock--set--date= "11/28/2014 19:43:00"
[Email protected] logs]# Hwclock--show
Fri 07:43:04 PM EST-0.750458 seconds
[Email protected] logs]#

[Email protected] logs]# Hwclock--hctosys
[[Email protected] logs]# Date
Fri 19:45:42 EST 2014
[Email protected] logs]# Hwclock--show
Fri 07:45:49 PM EST-0.641103 seconds
[Email protected] logs]#

CentOS Time zone settings

Related Article

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.