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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • hd2616

    hd2616

    2021年9月27日
    39
  • 操作系统银行家算法C语言代码实现

    操作系统银行家算法C语言代码实现    计算机操作系统课设需要,写了两个下午的银行家算法(陷在bug里出不来耽误了很多时间),参考计算机操作系统(汤子瀛)    实现过程中不涉及难度较大的算法,仅根据银行家算法的思想和步骤进行实现。以下为详细步骤:   定义:max1[][]:最大需求矩阵,max1[i][j]为第i条进程的第j项资源的最大需求数目;   allo…

    2022年5月4日
    24
  • pycharm批量注释代码_pycharm批量缩进快捷键

    pycharm批量注释代码_pycharm批量缩进快捷键我们使用pycharm的时候,会遇到写注释的情况,单独一行还没事,直接加个#就可以解决问题,但是需要注释掉多行的代码的时候,我们如果,还是一个人一个敲#,就会很费时间,下面介绍一下pycharm里面批量注释的方法。当我们想要注释掉多行代码时,只需要Ctrl+a选中这几行代码,然后继续**Ctrl+/**就可以完成注释,取消注释也是同样的方法。…

    2022年8月25日
    4
  • linux修改用户的组_linux添加用户命令

    linux修改用户的组_linux添加用户命令From:http://www.cnblogs.com/xd502djj/archive/2011/11/23/2260094.html鸟哥官网Linux帐号管理与ACL权限设定:http://linux.vbird.org/linux_basic/0410accountmanager.php鸟哥官网(简体中文):http://cn.linux.vbird.org/linux_ba…

    2022年8月18日
    7
  • windows 安装 yarn「建议收藏」

    windows 安装 yarn「建议收藏」windows安装yarn下载node.jshttp://nodejs.cn/download/通过Chocolatey安装以管理员身份打开cmd.exe@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe"-NoProfile-InputFormatNone-ExecutionPolicy…

    2022年5月12日
    34
  • propertydescriptor是用来干什么的_java读取property文件

    propertydescriptor是用来干什么的_java读取property文件PropertyDescriptor中文叫属性描述器,是jiavaJavaBean的内省与BeanUtils库JavaBean是一种特殊的类,主要用于传递数据信息,这种类中的方法主要用于访问私有的字段,且方法名符合某种命名规则。如果在两个模块之间传递信息,可以将信息封装进JavaBean中,这种对象称为“值对象”(ValueObject),或“VO”。方法比较少。这些信息储存在类的私有变量中,通过set()、get()获得。JavaJDK中提供了一套API用来访问某个属性的getter/setter方

    2022年9月28日
    0

发表回复

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

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