Centos 7 修改日期和时间的命令

timedatectl set-ntp no //关闭时间动态更新
timedatectl set-time "YYYY-MM-DD HH:MM:SS" //设置时间和日期
timedatectl set-ntp yes //开启时间动态更新

date    //查看当前时间和日期

原文地址:https://www.cnblogs.com/withfeel/p/10721703.html