时光沉淀

CentOS系统时间和时区查看以及修改的方法

· Views · By 浪子

一、时间修改

远程连接到centos 或者直接登录系统

date 查看系统时间

date -s 修改时间

看下面的例子

date -s  03/04/2013(将系统日期设定为2013年03月04日)

date -s  110:38(将系统时间设定为上午 10:38)

二、时区修改

先查看时区

date -R

 

修改时区:

(将Asia/shanghai-上海时区写入当前时区)

cp -f /usr/share/zoneinfo/Asia/Shanghai     /etc/localtime

提示是否覆盖,输入Y回车,

然后

date

查看时区和时间(CST,中国时区)

评论

0 条评论

暂无评论

Using $this when not in object context

Error: Using $this when not in object context in /app/data/plugins/FediverseSync/template/comment.php:3 Stack trace: #0 /app/data/plugins/FediverseSync/Plugin.php(989): require_once() #1 [internal function]: FediverseSync_Plugin::renderComments(Object(Widget\Archive), NULL) #2 /app/var/Typecho/Plugin.php(446): call_user_func_array(Array, Array) #3 /app/var/Widget/Archive.php(1274): Typecho\Plugin->__call('Widget_Archive:...', Array) #4 /app/data/themes/paper-main/footer.php(23): Widget\Archive->footer() #5 /app/var/Widget/Archive.php(1336): require('/app/data/theme...') #6 /app/data/themes/paper-main/post.php(51): Widget\Archive->need('footer.php') #7 /app/var/Widget/Archive.php(1418): require_once('/app/data/theme...') #8 /app/var/Typecho/Router.php(99): Widget\Archive->render() #9 /app/index.php(23): Typecho\Router::dispatch() #10 {main}