时区提示:Local time zone must be set--see zic manual page 2018的解决办法
set -- 提示 解决办法 be 2018 Time must
2023-09-27 14:24:04 时间
问题描述:在centos服务器上执行date命令时,显示的时间信息中的时区不正常,如下:
[root@ulocalhost ~]# date Mon Apr 9 02:57:38 Local time zone must be set--see zic manual page 2018
即显示Local time zone must be set--see zic manual
解决办法:
1)查看软连接是否在本地时区,这里我选择上海时区
[root@localhost ~]# rm -f /etc/localtime [root@localhost ~]# ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime [root@localhost ~]# ll /etc/localtime lrwxrwxrwx 1 root root 33 Apr 9 10:57 /etc/localtime -> /usr/share/zoneinfo/Asia/Shanghai
2)接着执行
[root@localhost ~]# export TZ='Asia/Shanghai' [root@localhost ~]# vim ~/.bashrc //文件底部添加下面内容 ...... export TZ='Asia/Shanghai'
注意:以上是在root用户下生效的操作,如果在普通用户下,可能还会出现"Local time zone must be set--see zic manual",这就需要在普通用户下执行"export TZ='Asia/Shanghai'",以及把这个命令写入到普通用户的.bashrc文件里。
相关文章
- List集合/Set集合/Map集合
- mybatis:延迟加载时不要在get/set方法上面添加final关键字(原创)
- Pandas-打印处理(一):打印结果展示省略号的问题【pd.set_option(‘display.参数‘, 1000)】【参数:max_columns、width、max_colwidth】
- STL容器-- set and multiset 用法
- ES6笔记(6)-- Set、Map结构和Iterator迭代器
- 三菱PLC报错2401--FILE SET ERROR解决方案
- HDU 5321 Beautiful Set 漂亮集合
- Java链接Redis时出现 “ERR Client sent AUTH, but no password is set” 异常的原因及解决办法
- 新建本地仓库,同步远程仓场景,出现git branch --set-upstream-to=origin/master master 解决方法
- List、Set、Map典型实现
- Python的set集合详解
- STL:set的使用
- MongoDB副本集replica set(四)--成员配置
- MongoDB副本集replica set(三)--添加删除成员
- MongoDB副本集replica set (二)--副本集环境搭建
- MongoDB副本集replica set (一)--基础知识
- halcon-set_value_matrix设置矩阵的一个或多个元素
- halcon-set_full_matrix设置矩阵的值
- USB设备状态设置-- usb_gadget_set_state()
- MySQL Strict Mode is not set for database connection 'default'
- 【集合我能讲两小时071】说说list,map,set三者之间的区别?