centos在设置时区

centos在设置时区

大家好,又见面了,我是全栈君,今天给大家准备了Idea注册码。

[root@localhost ~]# date -R     // 查看时区

Mon, 19 May 2014 10:18:46 +0000

[root@localhost ~]# 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: Mon May 19 18:19:27 CST 2014.

Universal Time is now: Mon May 19 10:19:27 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@localhost ~]# date

Mon May 19 10:19:45 UTC 2014

[root@localhost ~]# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime  // 替换系统时区文件

cp: overwrite `/etc/localtime’? y

[root@localhost ~]# ntpdate time.windowscom

^[[A^C

[root@localhost ~]# ntpdate time.windows.com  // 同步时间

19 May 18:22:09 ntpdate[3400]: adjust time server 65.55.56.206 offset -0.286027 sec

[root@localhost ~]# date

Mon May 19 18:22:10 CST 2014

//參考: http://blog.163.com/zilichen0213@126/blog/static/17303755520118423614908/

版权声明:本文博主原创文章,博客,未经同意不得转载。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/116801.html原文链接:https://javaforall.net

赞 (0)
全栈程序员-站长的头像全栈程序员-站长

相关推荐

  • babel es6转es5原理_es6兼容es5吗

    babel es6转es5原理_es6兼容es5吗首先需要安装依赖环境npmi–save-devbabel-clibabel-preset安装es5转换npmi–save-devbabel-preset-es2015安装polyfillnpmi–save-devbabel-polyfill安装运行时转换npmi–save-devbabel-plugin-transform-r…

    2022年9月24日
  • android中UI设计心得

    android中UI设计心得UI布局的设计,布局方式有相对布局(RelativeLayout)线性布局(LinearLayout),表格布局(TableLayout),网格布局(GridLayout),帧布局(FrameLayout),绝对布局(AbsoluteLayout);下面这个界面的布局格式,是通过相对布局实现的,每一行是一个整体,整体里面也是也是通过相对布局实现的;编写项目时,我们需要在res中创建文件夹一定要

    2022年6月26日
  • 区块链工程师需要掌握哪些技能?

    作者:Annchain(本文一切著作权归annchain技术团队所有,未经许可,不得转载。若需转载请联系页尾二维码。) 从2017年开始,区块链逐步成为互联网的风口浪尖。曝光度的激增带来了人才市场的火爆。 区块链所要求的知识并非什么特殊的或者新兴的知识,除了密码学领域的知识需要专门了解之外,其他知识和技能几乎都是一些比较通用的网络开发核心知识。 由于区块链行业涉及到的范…

    2022年4月5日
  • Python环境配置及项目建立

    Python环境配置及项目建立一、安装PythonPython比较稳定的两个版本是Python3.5和Python2.7,我用的是Python2.7,下载地址是:https://www.python.org/downloa

    2022年7月5日
  • java递归函数详解_java保存递归结果

    java递归函数详解_java保存递归结果一、递归函数,通俗的说就是函数本身自己调用自己…如:n!=n(n-1)!你定义函数f(n)=nf(n-1)而f(n-1)又是这个定义的函数。。这就是递归二、为什么要用递归:递归的目的是简化程序设计,使程序易读三、递归的弊端:尽管非递归函数效率高,但较难编程,可读性较差。递归函数的缺点是添加�了系统开销,也就是说,每递归一次,栈内存就多占用一截四、递归的条件:需有完毕任务的语句,需满足递归的要求…

    2022年9月18日
  • Swift — 面向对象中类和对象的属性

    Swift — 面向对象中类和对象的属性

    2022年2月2日

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号