世界协调时间(Universal Time Coordinated,UTC):

GPS 系统中有两种时间区分,一为UTC,另一为LT(地方时)两者的区别为时区不同,UTC就是0时区的时间,地方时为本地时间,如北京为早上八点(东八区),UTC时间就为零点,时间比北京时晚八小时,以此计算即可。

[linuxidc@localhost linuxidc.com]$ date
2018年 10月 28日 星期日 03:08:23 UTC

可以执行tzselect命令按提示更换时区,依次选择5-Asia,9-China,1-Beijing Time。

[linuxidc@localhost linuxidc.com]$ 

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
#? 

Please select one of the following time zone regions.
1) Beijing Time
2) Xinjiang Time
#? 

The following information has been given:

China
 Beijing Time

Therefore TZ='Asia/Shanghai' will be used.
Local time is now: Sun Oct 28 11:12:54 CST 2018.
Universal Time is now: Sun Oct 28 03:12:54 UTC 2018.
Is the above information OK?
1) Yes
2) No
#?

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

1.将TZ='Asia/Shanghai'; export TZ这行添加到/etc/profile(所有用户生效)或者~/.bash_profile(当前用户生效)

2.退出重新登录即可,也可执行source /etc/profile或source ~/.bash_profile立即生效

3.这时候再执行date查看日期就可以发现时区改为北京时间啦。

[linuxidc@localhost www.linuxidc.com]$ date
2018年 10月 28日 星期日 11:26:14 CST

经过以上步骤,我们的CentOS Linux系统时间和计算机硬件时间终于都是CST时间了,并且都是北京时间。

CentOS系统将UTC时间修改为CST时间方法的更多相关文章

  1. CentOS系统将UTC时间修改为CST时间

    1.编辑时间配置文件 # vi /etc/sysconfig/clock ZONE="Asia/Shanghai" UTC=false #设置为false,硬件时钟不于utc时间一 ...

  2. CentOS linux系统将UTC时间修改为CST时间

    1.编辑时间配置文件 1 2 3 4 # vi /etc/sysconfig/clock           ZONE="Asia/Shanghai"     UTC=false  ...

  3. CentOS 6.6实现永久修改DNS地址的方法

    本文实例讲述了CentOS 6.6实现永久修改DNS地址的方法. 百牛信息技术bainiu.ltd整理发布于博客园 分享给大家供大家参考,具体如下:1.配置ip地址文件 /etc/sysconfig/ ...

  4. 24时区,GMT,UTC,DST,CST时间详解

    全球24个时区的划分      相较于两地时间表,可以显示世界各时区时间和地名的世界时区表(World Time),就显得精密与复杂多了,通常世界时区表的表盘上会标示着全球24个时区的城市名称,但究竟 ...

  5. GMT,UTC,DST,CST时间详解

    全球24个时区的划分       相较于两地时间表,可以显示世界各时区时间和地名的世界时区表(World Time),就显得精密与复杂多了,通常世界时区表的表盘上会标示着全球24个时区的城市名称,但究 ...

  6. linux把EDT时间修改为CST格式

    初始时间:2012年 09月 14日 星期五 18:15:33 EDT [root@test ~]# mv /etc/localtime /etc/localtime.bak [root@test ~ ...

  7. 转:CentOS系统yum源配置修改、yum安装软件包源码包出错解决办法!

    yum安装包时报错: Could not retrieve mirrorlist http://mirrorlist.repoforge.org/el6/mirrors-rpmforge error ...

  8. CentOS系统yum源配置修改、yum安装软件包源码包出错解决办法apt.sw.be couldn't connect to host

    yum安装包时报错: Could not retrieve mirrorlist http://mirrorlist.repoforge.org/el6/mirrors-rpmforge error  ...

  9. Centos系统 tomcat 中的应用与北京时间相差8小时

    解决方法: 在 catalina.sh中的 JAVA_OPTS 加上 -Duser.timezone=GMT+08  启动时 startup.sh 会调用 catalina.sh.

随机推荐

  1. 2018-8-10-三种方式设置特定设备UWP-XAML-view

    title author date CreateTime categories 三种方式设置特定设备UWP XAML view lindexi 2018-08-10 19:16:52 +0800 20 ...

  2. sql —— order by

    用于对结果集进行排序. 原表: 根据成绩这列数据进行升序排序: 根据成绩这列数据进行降序排序:

  3. wepy —— 组件之间通信

    一.props 1.静态传值 —— 父组件向子组件传递常量数据 // 父组件 <coma fruitName="橘子"></coma> // 子组件 // ...

  4. jquery的操作

    jQuery jQuery介绍 jQuery是一个轻量级的.兼容多浏览器的JavaScript库. jQuery使用户能够更方便地处理HTML Document.Events.实现动画效果.方便地进行 ...

  5. LightOJ 1370 Bi-shoe and Phi-shoe【欧拉函数 && 质数】

    题目链接: http://lightoj.com/login_main.php?url=volume_showproblem.php?problem=1370 题意: 给定值,求满足欧拉值大于等于这个 ...

  6. MongoDB -- JAVA基本API操作

    package com.example.mongodb.mongodb.demo; import com.mongodb.MongoClient; import com.mongodb.client. ...

  7. oralce函数 STDDEV([distinct|all]x)

    [功能]统计数据表选中行x列的标准误差. [参数]all表示对所有的值求标准误差,distinct只对不同的值求标准误差,默认为all 如果有参数distinct或all,需有空格与x(列)隔开. [ ...

  8. Gym - 101480A_ASCII Addition

    题目链接 题解:普通的a+b才怪问题,需要绘制出来,方法有点麻烦. #include <iostream> #include <string.h> #include <s ...

  9. POLARDB v2.0 技术解读

    点击观看“POLARDB 2.0 升级发布会”:https://yq.aliyun.com/live/1136 回顾POLARDB 1.0 POLARDB 1.0 主要的改进包括采用了计算存储分离的架 ...

  10. idea使用积累

    1.初试化配置参照http://m.blog.csdn.net/robertohuang/article/details/75042116,很详细. 2.idea中忽略.idea,.iml这两个文件 ...