[root@ logs]# tzselect
Please identify a location so that 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
10) Pacific Ocean
11) none - I want to specify the time zone using the Posix TZ format.
#? 5
Please select a country.
1) Afghanistan 18) Israel 35) Palestine
2) Armenia 19) Japan 36) Philippines
3) Azerbaijan 20) Jordan 37) Qatar
4) Bahrain 21) Kazakhstan 38) Russia
5) Bangladesh 22) Korea (North) 39) Saudi Arabia
6) Bhutan 23) Korea (South) 40) Singapore
7) Brunei 24) Kuwait 41) Sri Lanka
8) Cambodia 25) Kyrgyzstan 42) Syria
9) China 26) Laos 43) Taiwan
10) Cyprus 27) Lebanon 44) Tajikistan
11) East Timor 28) Macau 45) Thailand
12) Georgia 29) Malaysia 46) Turkmenistan
13) Hong Kong 30) Mongolia 47) United Arab Emirates
14) India 31) Myanmar (Burma) 48) Uzbekistan
15) Indonesia 32) Nepal 49) Vietnam
16) Iran 33) Oman 50) Yemen
17) Iraq 34) 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' will be used.
Local time is now: Sat Nov 29 08:38:21 CST 2014.
Universal Time is now: Sat Nov 29 00:38:21 UTC 2014.
Is the above information OK?
1) Yes
2) No
#? 1

You can make this change permanent for yourself by appending the line
TZ='Asia/Shanghai'; export TZ
to the file '.profile' in your home directory; then log out and log in again.

Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Asia/Shanghai

[root@ logs]# /usr/sbin/ntpdate 58.68.228.43
28 Nov 06:41:55 ntpdate[48506]: step time server 58.68.228.43 offset -46703.849158 sec
[root@ logs]# date
Fri Nov 28 06:41:58 EST 2014
[root@ logs]# date -s 19:40
Fri Nov 28 19:40:00 EST 2014
[root@ logs]# date -s 19:41
Fri Nov 28 19:41:00 EST 2014
[root@ logs]# date
Fri Nov 28 19:41:02 EST 2014
[root@ logs]# date -R
Fri, 28 Nov 2014 19:41:07 -0500
[root@ logs]# hwclock --show
Fri 28 Nov 2014 06:42:56 AM EST -0.091356 seconds
[root@ logs]# hwclock --set --date="11/28/2014 19:43:00"
[root@ logs]# hwclock --show
Fri 28 Nov 2014 07:43:04 PM EST -0.750458 seconds
[root@ logs]#

[root@ logs]# hwclock --hctosys
[root@ logs]# date
Fri Nov 28 19:45:42 EST 2014
[root@ logs]# hwclock --show
Fri 28 Nov 2014 07:45:49 PM EST -0.641103 seconds
[root@ logs]#

centos时区设置的更多相关文章

  1. centos 时区设置初认识

    由于一些需要,我租用了一个海外服务器,并开始了我的centos之旅. 由于之前一直用虚拟机,而且在国内,所以不需要考虑时区的问题,但是现在,这个服务器是在海外的,所以就必须考虑时区的问题了.更何况我的 ...

  2. Centos 7设置静态IP,修改时区,关闭防火墙

    Centos 7设置静态IP # vi /etc/sysconfig/network-scripts/ifcfg-enxxx BOOTPROTO="static" ...... I ...

  3. CentOS 7 设置时区、日期和时间

    CentOS 7 设置时区.日期和时间 changhr2013关注 2019.04.19 01:33:09字数 307阅读 139 在 CentOS 7 中,引入了一个叫 timedatectl 的设 ...

  4. 如何在 CentOS 中设置 NTP 服务器

    网络时间协议(NTP)用来同步网络上不同主机的系统时间.你管理的所有主机都可以和一个指定的被称为 NTP 服务器的时间服务器同步它们的时间.而另一方面,一个 NTP 服务器会将它的时间和任意公共 NT ...

  5. linux下jenkins的时区设置问题

    https://blog.csdn.net/king_wang10086/article/details/76178711 [root@jenkins ~]# yum install -y ntpda ...

  6. CentOS 7 设置日期和时间

    现代操作系统分为以下两种类型的时钟: 实时时钟(Real-Time Clock,RTC),通常称为硬件时钟(一般是系统主板上的集成电路),它完全独立于操作系统的当前状态,即使在计算机关闭时也能运行. ...

  7. centos 时区的更改 UTC TO CST

    在CentOS Linux中终端命令中执行以下命令: 1).vi /etc/sysconfig/clock   #编辑时间配置文件 ZONE="Asia/Shanghai" UTC ...

  8. CentOS 7 设置日期和时间 timedatectl

    CentOS 7 设置日期和时间 在CentOS 6版本,时间设置有date.hwclock命令,从CentOS 7开始,使用了一个新的命令timedatectl. timedatectl [root ...

  9. centos7时间同步和时区设置

    centos7时间同步和时区设置 安装ntp服务的软件包 sudo yum install ntp 将ntp服务设置为缺省启动 systemctl enable ntpd 修改启动参数,增加-g -x ...

随机推荐

  1. Idea中JDK为1.8,还提示Diamond types are not supported at this language level

    project的java level 已经核实确实为8,但是IDEA里面仍然会有如下图的提示: 通过查看项目设置,发现project的java level 也是8. 然后继续检查其他模块 如modul ...

  2. Java基础——Servlet(七)过滤器&监听器 相关

    一.过滤器简介 Filter 位于客户端和请求资源之间,请求的资源可以是 Servlet Jsp html (img,javascript,css)等.用于拦截浏览器发给服务器的请求(Request) ...

  3. pom.xml复制过来的代码报错-Maven expected START_TAG or END_TAG not TEXT (positionTEXT se

    场景 编译器:IDEA 在网上看一些小实例,跟着做的时候会复制pom.xml文件的代码来加载依赖包.首先需要确定你复制过来的代码本身是没有错的,在复制一些pom.xml文件代码时,有时候会报错.原因是 ...

  4. Spring - constructor-arg和property的使用示例

    一.说明    constructor-arg:通过构造函数注入.     property:通过setter对应的方法注入. 二.property使用实例 1.Model代码: public cla ...

  5. 在EXT框架中,使用JS文件设置UEditor文本框,出现新增内容很多,页面变型,不出现滚动条,导致无法进行操作。

    找到UEditor的配置文件:ueditor.config.js(这是我的项目的UEditor的配置文件名) 找到参数设置 autoHeightEnabled 是否自动增长参数,默认为TRUE 当默认 ...

  6. javascript刷新父页面的各种方法汇总

    1.用iframe.弹出子页面刷新父页面iframe <script language=JavaScript> parent.location.reload(); </script& ...

  7. HDU 6138 Fleet of the Eternal Throne(后缀自动机)

    题意 题目链接 Sol 真是狗血,被疯狂卡常的原因竟是 我们考虑暴力枚举每个串的前缀,看他能在\(x, y\)的后缀自动机中走多少步,对两者取个min即可 复杂度\(O(T 10^5 M)\)(好假啊 ...

  8. 【读书笔记】iOS-Settings Bundle

    一,打开工程--->右键--->Add File--->iOS-->Resource-->Settings Bundle. 二,会弹出如下对话框---->Creat ...

  9. ionic 项目签名

    一.ionic 自动签名的好处与坏处(ionic build android/ios)  好处在于:可以直接安装手机上进行安装测试,也可以上传Android或者iOS平台 不好的地方在于:你的电脑环境 ...

  10. 配置Synwrite作为Python的IDE

    先建立批处理 建立SynPython.bat ::Synwrite call Python to compile file ::Set Path @ set PATH=H:\XPprogram\Cod ...