[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. (1)Jquery1.8.3快速入门_helloworld

    jquery 快速入门 学习记录 1.第一个jquery程序 helloworld: 需要导入Jquery1.8.3的库 ,下载地址: jQuery1.8.3   代码令另存到本地 保存为jquery ...

  2. 漫画 | Servlet属于线程安全的吗?

    Servlet属于线程安全的吗? Servlet不是线程安全的 在JSP中,只有一行代码:<%=A+B %>,运行结果如何? jsp和servlet有什么关系? jsp一般被用在view层 ...

  3. input上传文件个数控制

    HTML: <h3>请上传[2,5]个文件</h3> <form action="" enctype="multipart/form-dat ...

  4. Openlayer3之瓦片数据接入

    瓦片数据集接入实现思路: 1.构造ol.source.TileImage数据源,构造该数据源需要以下几项: 1)空间参考,通过如下代码构造 2)TileGrid,构造需要以下几项: a)原点 b)分辨 ...

  5. springcloud 入门 11 (Hystrix Dashboard)

    hystrix: 断路器我在前面已经介绍,不了解的可以参考 :springcloud 入门 6 (断路器hystrix)  关于搭建,测试我都在这里面进行说明了,这章介绍的是  Hystrix Das ...

  6. 利用搜狐新闻语料库训练100维的word2vec——使用python中的gensim模块

    关于word2vec的原理知识参考文章https://www.cnblogs.com/Micang/p/10235783.html 语料数据来自搜狐新闻2012年6月—7月期间国内,国际,体育,社会, ...

  7. 使用katalon自带Spy功能获取/验证控件Selector、XPath

    背景 最近刚接手一个katalon编写的UI自动化项目,页面最近刚改版,已有用例很多查找元素失败.了解到katalon元素定位支持xpath,所以直接使用chrome开发者工具打开目标页面+获取xpa ...

  8. maven(九),install安装到本地仓库

    下载oracle驱动jar包 在maven中央仓库中,是没有oracle驱动jar包的.因为oracle是商业软件,其jar包不允许用作开源用途.从http://www.mvnrepository.c ...

  9. maven五:查找jar包坐标,选择jar包版本

    查找jar包坐标 以spring core的jar包为例,访问http://www.mvnrepository.com/    在最上方中间,输入spring core,点击Search. 搜索结果第 ...

  10. SVN——Couldn't perform atomic initialization

    前言   今天早上刚刚打开我的电脑,就被李总他们告知不能正确用SVN从服务器上下载代码了,然后看问题吧.问题其实也是本文的标题,并不难解决,写下来留个记录,顺便也算是一种分享.问题截图如下:    造 ...