linux系统时间

使用date命令查看时区

[root@localhost ~]# date -R
Thu, 13 Jul 2017 14:25:21 +0800

查看clock系统配置文件

[root@localhost ~]# more /etc/sysconfig/clock
ZONE="Asia/Shanghai"

设置系统所在的时区

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

[root@localhost ~]# vi /etc/profile
PATH=$PATH:$HOME/bin
TZ='Asia/Shanghai'; export TZ
export PATH
unset USERNAME
[root@localhost ~]# source /etc/profile

修改系统时间 时间分秒
[root@localhost ~]# date -s 14:44:00
2017年 07月 13日 星期四 14:44:00 CST


查看系统硬件时钟

[root@localhost ~]# hwclock  --show
2017年07月13日 星期四 15时00分59秒  -0.781922 seconds


设置硬件时间

[root@localhost pso]# hwclock --set --date="07/13/17 14:50:00"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值