Linux修改时区

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任

CentOS6:

查看以前的时区:

[root@localhost mysql]# vim /etc/sysconfig/clock

将里面的参数改成Asia/Shanghai

[root@localhost mysql]# rm -f /etc/localtime

[root@localhost mysql]# ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

查看时间 [root@localhost mysql]# date

Fri Sep 29 21:41:47 CST 2017

更新到现在的时间 [root@localhost mysql]# ntpdate time.nist.gov

29 Sep 13:43:11 ntpdate[12571]: step time server 132.163.4.104 offset -28739.755402 sec

[root@localhost mysql]# date

Fri Sep 29 13:43:14 CST 2017

[root@localhost mysql]# hwclock -w

CentOS7:

timedatectl set-timezone Asia/Shanghai

linux修改时区的更多相关文章

  1. Linux 修改时区(PDT修改为CST)

    方法1: Linux 修改时区 本文链接:https://blog.csdn.net/Aritem/article/details/79213306 命令:tzselect 按照顺序依次输入5,9,1 ...

  2. Linux 修改时区的办法

    Linux修改时区的正确方法 CentOS和Ubuntu的时区文件是/etc/localtime,但是在CentOS7以后localtime以及变成了一个链接文件 [root@centos7 ~]# ...

  3. [转帖]Linux修改时区的正确方法

    Linux修改时区的正确方法 /etc/localtime 以及timedatectl 两种方式修改时区. CentOS和Ubuntu的时区文件是/etc/localtime,但是在CentOS7以后 ...

  4. [转帖]Linux修改时区

    公司一台国产服务器的时间总是错的 我用 date -R 出来的结果 是 +7.0 修改办法就是 这个文档来里面的 https://www.cnblogs.com/royfans/p/8056270.h ...

  5. Linux修改时区以及同步时间

    Centos7为例:修改时区 timedatectl list-timezones |grep Shanghai #查找中国时区的完整名称 Asia/Shanghai timedatectl set- ...

  6. Linux修改时区的正确方法

    CentOS和Ubuntu的时区文件是/etc/localtime,但是在CentOS7以后localtime以及变成了一个链接文件 [root@centos7 ~]# ll /etc/localti ...

  7. Linux 修改时区

    CentOS 7修改方式如下: # lsb_release -a  --查看系统版本-CentOS Linux release 7.6 # timedatectl     --查看当前系统时区# ls ...

  8. linux修改时区,时间格式

    修改为上海的时区: 查看当前时区 date cp -vf /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime vim /etc/sysconfig/cl ...

  9. [原]Linux 修改时区

    1.查看当前时区 date -R 2.修改当前时区 tzselect 之后会出来一个选项菜单,选择你想要的时区就OK了 3.替换系统时区文件 cp /usr/share/zoneinfo/XXX/YY ...

随机推荐

  1. B. Pyramid of Glasses

    原题链接 B. Pyramid of Glasses Mary has just graduated from one well-known University and is now attendi ...

  2. hdu 2018递推

    第n月的牛的数量由第n-1个月的老牛加上n-1个月新生的小牛,得到公式F(n)=F(n-1)+F(n-3) AC代码: #include<cstdio> const int maxn=55 ...

  3. 转载 git Unknown SSL protocol error in connection to github.com:443

    1.执行命令:git pull –progress –no-rebase -v "origin",报错,如图1 fatal: unable to access 'https://g ...

  4. js中的Object.defineProperty()和defineProperties()详解

    ECMAS-262第5版在定义只有内部采用的特性时,提供了描述了属性特征的几种属性.ECMAScript对象中目前存在的属性描述符主要有两种,数据描述符(数据属性)和存取描述符(访问器属性),数据描述 ...

  5. 关于echarts

    昨天随手玩了下echarts,看见同事纠结于echarts的兼容问题. 最简单的echarts(官网的): <div id="main" style="width: ...

  6. Indent Guides for Visual Studio 代码格式化收缩插件

    代码格式化收缩插件 下载地址:http://indentguide.codeplex.com/releases/view/110312 更多关注付义方技术博客:http://blog.csdn.net ...

  7. hdu5937 Equation

    题解其实网上有 突然有点感想 为什么可以用搜索或状压,因为方案数很有限,它要求每种方案不同就意味着搜索的次数也一定,所以现在就应该坚定往这方面想,找部分方案的贪心.这和上一题一样,都是先暴力,后面处理 ...

  8. OpenGL shader渲染贴图

    simple.vert #version core layout (location = ) in vec3 position; layout (location = ) in vec3 color; ...

  9. Python基础_如何用pip安装文件

    与其他语言相比,Python的一个很大的优势是由丰富的资源库,这就需我们按照自己的来安装文件和包.本节以在windows系统下安装pygame 为例来讲述一下安装步骤. 1. 检测python中有没有 ...

  10. SDP(11):MongoDB-Engine功能实现

    根据上篇关于MongoDB-Engine的功能设计方案,我们将在这篇讨论里进行功能实现和测试.下面是具体的功能实现代码:基本上是直接调用Mongo-scala的对应函数,需要注意的是java类型和sc ...