centos时区设置
[root@ logs]# 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.
#? 5
Please select a country.
1) Afghanistan 18) Israel 35) Palestine
2) Armenia 19) Japan 36) Philippines
3) Azerbaijan 20) Jordan 37) Qatar
4) Bahrain 21) Kazakhstan 38) Russia
5) Bangladesh 22) Korea (North) 39) Saudi Arabia
6) Bhutan 23) Korea (South) 40) Singapore
7) Brunei 24) Kuwait 41) Sri Lanka
8) Cambodia 25) Kyrgyzstan 42) Syria
9) China 26) Laos 43) Taiwan
10) Cyprus 27) Lebanon 44) Tajikistan
11) East Timor 28) Macau 45) Thailand
12) Georgia 29) Malaysia 46) Turkmenistan
13) Hong Kong 30) Mongolia 47) United Arab Emirates
14) India 31) Myanmar (Burma) 48) Uzbekistan
15) Indonesia 32) Nepal 49) Vietnam
16) Iran 33) Oman 50) Yemen
17) Iraq 34) Pakistan
#? 9
Please select one of the following time zone regions.
1) east China - Beijing, Guangdong, Shanghai, etc.
2) Heilongjiang (except Mohe), Jilin
3) central China - Sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc.
4) most of Tibet & Xinjiang
5) west Tibet & Xinjiang
#? 1
The following information has been given:
China
east China - Beijing, Guangdong, Shanghai, etc.
Therefore TZ='Asia/Shanghai' will be used.
Local time is now: Sat Nov 29 08:38:21 CST 2014.
Universal Time is now: Sat Nov 29 00:38:21 UTC 2014.
Is the above information OK?
1) Yes
2) No
#? 1
You can make this change permanent for yourself by appending the line
TZ='Asia/Shanghai'; export TZ
to the file '.profile' in your home directory; then log out and log in again.
Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Asia/Shanghai
[root@ logs]# /usr/sbin/ntpdate 58.68.228.43
28 Nov 06:41:55 ntpdate[48506]: step time server 58.68.228.43 offset -46703.849158 sec
[root@ logs]# date
Fri Nov 28 06:41:58 EST 2014
[root@ logs]# date -s 19:40
Fri Nov 28 19:40:00 EST 2014
[root@ logs]# date -s 19:41
Fri Nov 28 19:41:00 EST 2014
[root@ logs]# date
Fri Nov 28 19:41:02 EST 2014
[root@ logs]# date -R
Fri, 28 Nov 2014 19:41:07 -0500
[root@ logs]# hwclock --show
Fri 28 Nov 2014 06:42:56 AM EST -0.091356 seconds
[root@ logs]# hwclock --set --date="11/28/2014 19:43:00"
[root@ logs]# hwclock --show
Fri 28 Nov 2014 07:43:04 PM EST -0.750458 seconds
[root@ logs]#
[root@ logs]# hwclock --hctosys
[root@ logs]# date
Fri Nov 28 19:45:42 EST 2014
[root@ logs]# hwclock --show
Fri 28 Nov 2014 07:45:49 PM EST -0.641103 seconds
[root@ logs]#
centos时区设置的更多相关文章
- centos 时区设置初认识
由于一些需要,我租用了一个海外服务器,并开始了我的centos之旅. 由于之前一直用虚拟机,而且在国内,所以不需要考虑时区的问题,但是现在,这个服务器是在海外的,所以就必须考虑时区的问题了.更何况我的 ...
- Centos 7设置静态IP,修改时区,关闭防火墙
Centos 7设置静态IP # vi /etc/sysconfig/network-scripts/ifcfg-enxxx BOOTPROTO="static" ...... I ...
- CentOS 7 设置时区、日期和时间
CentOS 7 设置时区.日期和时间 changhr2013关注 2019.04.19 01:33:09字数 307阅读 139 在 CentOS 7 中,引入了一个叫 timedatectl 的设 ...
- 如何在 CentOS 中设置 NTP 服务器
网络时间协议(NTP)用来同步网络上不同主机的系统时间.你管理的所有主机都可以和一个指定的被称为 NTP 服务器的时间服务器同步它们的时间.而另一方面,一个 NTP 服务器会将它的时间和任意公共 NT ...
- linux下jenkins的时区设置问题
https://blog.csdn.net/king_wang10086/article/details/76178711 [root@jenkins ~]# yum install -y ntpda ...
- CentOS 7 设置日期和时间
现代操作系统分为以下两种类型的时钟: 实时时钟(Real-Time Clock,RTC),通常称为硬件时钟(一般是系统主板上的集成电路),它完全独立于操作系统的当前状态,即使在计算机关闭时也能运行. ...
- centos 时区的更改 UTC TO CST
在CentOS Linux中终端命令中执行以下命令: 1).vi /etc/sysconfig/clock #编辑时间配置文件 ZONE="Asia/Shanghai" UTC ...
- CentOS 7 设置日期和时间 timedatectl
CentOS 7 设置日期和时间 在CentOS 6版本,时间设置有date.hwclock命令,从CentOS 7开始,使用了一个新的命令timedatectl. timedatectl [root ...
- centos7时间同步和时区设置
centos7时间同步和时区设置 安装ntp服务的软件包 sudo yum install ntp 将ntp服务设置为缺省启动 systemctl enable ntpd 修改启动参数,增加-g -x ...
随机推荐
- [PHP] 算法-二叉树的子结构判断的PHP实现
输入两棵二叉树A,B,判断B是不是A的子结构.(ps:我们约定空树不是任意一个树的子结构) 1.子树的意思是包含了一个节点,就得包含这个节点下的所有节点,两棵树同时到底 2.子结构可以是A树的任意一部 ...
- [PHP]算法-归并排序的PHP实现
<?php //归并排序 function merge(&$A,$left,$mid,$right,$temp){ //7.左堆起始 $i=$left; //8.右堆起始 $j=$mid ...
- [android] 手机卫士欢迎页检测更新
客户端:去服务器获取最新的版本信息 服务器端: 版本信息,最新的版本2.0 最新版本的下载地址:http://xxxxxxxx/mobilesafe2.0.apk 版本的描述信息 客户端如果不升级新版 ...
- 140 - The 12th Zhejiang Provincial Collegiate Programming Contest(浙江省赛2015)
Ace of Aces Time Limit: 2 Seconds Memory Limit: 65536 KB There is a mysterious organization c ...
- MATLAB中eig的作用
MATLAB中eig的作用 eig Find eigenvalues and eigenvectors 返回矩阵的特征值和特征向量; [V,D] = eig(A) D是特征值 V特征向量 例 ...
- MVC中使用JQuery方式进行异步请求和使用自带方式进行异步请求
在MCV中使用异步请求可以很很高效地进行前台和后台的数据传递,在这里,笔者为初学者介绍两种在MVC中常用的异步请求处理方式. 在这里,我们通过在一个页面中放置一个按钮来异步获取当前服务器端的系统时间为 ...
- canvas-2rect.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 【20181025】win10下Python安装osmnx包
系统:win10 64位 Python:3.7 在网上查了很多资料,主要有两种方法安装osmnx包,一种是通过anaconda安装,这种方法会自动帮你装好osmnx的依赖包:另一种是用pip安装,需要 ...
- cors解决跨域问题
在作前后端分离的时候,我们总是要做跨域处理. 使用 express 框架搭建项目的时候可以设置如下: app.use(function (req, res, next) { res.setHeader ...
- ionic 项目中ios上遇到的软键盘输入法自动弹出的问题
一. 安装插件 cordova plugin add ionic-plugin-keyboard 二. 软键盘显示监听 window.addEventListener('native.keyboar ...