zoukankan      html  css  js  c++  java
  • Centos7修改系统时区

    Centos7修改系统时区timezone

    注意:修改Linux系统的时区以后,再安装jvmjvm默认会使用系统的时区。

    如果系统时区设置错误,安装jvm后,再修改系统的时区,但jvm的时区仍然用不变,除非添加jvm的启动参数:-D user.timezone=GMT+08

    方法: timedatectl  set-timezone Asia/Shanghai

    首先输入命令: timedatectl,查看当前的time zone

    # timedatectl 

    Warning: Ignoring the TZ variable. Reading the system's time zone setting only.

          Local time: Mon 2016-11-21 01:52:42 EST

      Universal time: Mon 2016-11-21 06:52:42 UTC

            RTC time: Mon 2016-11-21 06:52:42

           Time zone: America/New_York (EST, -0500)

         NTP enabled: n/a

    NTP synchronized: no

     RTC in local TZ: no

          DST active: no

     Last DST change: DST ended at

                      Sun 2016-11-06 01:59:59 EDT

                      Sun 2016-11-06 01:00:00 EST

     Next DST change: DST begins (the clock jumps one hour forward) at

                      Sun 2017-03-12 01:59:59 EST

                      Sun 2017-03-12 03:00:00 EDT

                      

    设置时区为CST(8)

    # timedatectl set-timezone Asia/Shanghai

    Warning: Ignoring the TZ variable. Reading the system's time zone setting only.

          Local time: Mon 2016-11-21 14:52:59 CST

      Universal time: Mon 2016-11-21 06:52:59 UTC

            RTC time: Mon 2016-11-21 06:52:59

           Time zone: Asia/Shanghai (CST, +0800)

         NTP enabled: n/a

    NTP synchronized: no

     RTC in local TZ: no

          DST active: n/a

    [root@localhost ~]#

  • 相关阅读:
    FCKEditor配置
    在线文档编辑器原理
    DVD格式(vob)文件转换avi,转换后可嵌入HTML中播放
    Javascript小技巧
    sql server 查询当前记录的前一条和后一条记录
    [翻译]开发一个自己的HTML在线编辑器(二)
    在线编辑器(4)TAB键缩进功能
    IIS不能浏览ASP页面
    C#枚举类型的使用《转》
    C#中泛型使用《转》
  • 原文地址:https://www.cnblogs.com/mscar/p/12964090.html
Copyright © 2011-2022 走看看