centos在设置时区
[root@localhost ~]# date -R
// 查看时区
Mon, 19 May 2014 10:18:46 +0000
[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.
#? 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: Mon May 19 18:19:27 CST 2014.
Universal Time is now: Mon May 19 10:19:27 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@localhost ~]# date
Mon May 19 10:19:45 UTC 2014
[root@localhost ~]# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime // 替换系统时区文件
cp: overwrite `/etc/localtime'? y
[root@localhost ~]# ntpdate time.windowscom
^[[A^C
[root@localhost ~]# ntpdate time.windows.com // 同步时间
19 May 18:22:09 ntpdate[3400]: adjust time server 65.55.56.206 offset -0.286027 sec
[root@localhost ~]# date
Mon May 19 18:22:10 CST 2014
//參考: http://blog.163.com/zilichen0213@126/blog/static/17303755520118423614908/
版权声明:本文博主原创文章,博客,未经同意不得转载。
centos在设置时区的更多相关文章
- CentOS 7 设置时区、日期和时间
CentOS 7 设置时区.日期和时间 changhr2013关注 2019.04.19 01:33:09字数 307阅读 139 在 CentOS 7 中,引入了一个叫 timedatectl 的设 ...
- CentOS 7: 设置时区和时间
查看当前时区和时间 $ date $ ls -l /etc/localtime 查看所有可用时区 $ timedatectl list-timezones | grep Asia 设置时区 $ tim ...
- Centos 7设置静态IP,修改时区,关闭防火墙
Centos 7设置静态IP # vi /etc/sysconfig/network-scripts/ifcfg-enxxx BOOTPROTO="static" ...... I ...
- centos 6.5 查看时区和设置时区
centos6.x 和centos7.x在时区方面有点差距,本文是针对centos6.x进行介绍. 其实在我的一个博文里,在安装系统的时候就可以进行时区的设置,本文介绍的是用命令进行时区查看和设置. ...
- CentOS设置时区
1.使用date命令查看当前时间 2.已软连接的方式设置时区 ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
- CentOS 7 修改时区(转)
本文转载至:http://mathslinux.org/?p=637 Linux 系统(我特指发行版, 没说内核) 下大部分软件的风格就是不会仔细去考虑向后 的兼容性, 比如你上个版本能用这种程序配置 ...
- 如何在 CentOS 中设置 NTP 服务器
网络时间协议(NTP)用来同步网络上不同主机的系统时间.你管理的所有主机都可以和一个指定的被称为 NTP 服务器的时间服务器同步它们的时间.而另一方面,一个 NTP 服务器会将它的时间和任意公共 NT ...
- CentOS 7 修改时区
转自:http://blog.csdn.net/robertsong2004/article/details/42268701 本文转载至:http://mathslinux.org/?p=637 L ...
- CentOS 7 设置日期和时间
现代操作系统分为以下两种类型的时钟: 实时时钟(Real-Time Clock,RTC),通常称为硬件时钟(一般是系统主板上的集成电路),它完全独立于操作系统的当前状态,即使在计算机关闭时也能运行. ...
随机推荐
- 后缀数组--可重叠的K次最长重复子串(POJ3261)
题目:Milk Patterns #include <stdio.h> #include <string.h> #define N 1000010 int wa[N],wb[N ...
- Android 表格布局<TableLayout>
表格布局即,tableLayout,表格布局通过行.列的形式来管理UI组件,TablelLayout并不需要明确地声明包含多少行.多少列,而是通过TableRow,以及其他组件来控制表格的行数和列数, ...
- php使用http请求头实现文件下载
众所周知php对http协议的依赖特别强,像java或者asp.net在某些情况下可以不依赖http例如asp.net的winform,对php来说文件下载可以使用http的请求头加上php的IO就可 ...
- 新闻专栏~ART让Android更流畅
潘鹏在CSDN上原创,如其它站点转载请注意排版和写明出处: ART.Android新的内存垃圾回收机制 ART的优点:代码加载速度加快----编译次数降低 Android的卡顿是由于内存垃圾回收机制. ...
- [C++]函数指针与指针函数
函数指针与指针函数,之前总是分不清,今天就好好把它两认认清楚. 先从概念说起,简单是理解. 函数指针:是指针.一个指向某一个函数入口地址的指针. 指针函数:是函数.一个返回值是指针的函数. 记忆: 从 ...
- 开玩笑Web它servlet(五岁以下儿童)---- 如何解决servlet线程安全问题
servlet默认值是安全线的存在,但说白,servlet安全线实际上是一个多线程线程安全问题.因为servlet它正好是一个多线程的安全问题出现. 每次通过浏览器http同意提交请求,将一个实例se ...
- oracle 之 内存—鞭辟近里(四)
oracle 之 内存—鞭辟近里(四) 今天是2013-07-11日,首先我非常感谢我的哥们也是我的网友杨工,非常感谢他能在大数据库内帮我执行一下我所需要的信息.就是他说的网络真是一个互助友爱的平台. ...
- hdu1712(分组背包)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1712 分析: 典型的分组背包问题,如果不会的可以看一下背包九讲. 看下背包九讲中的描述: for 所有 ...
- SWT中在treeview中显示图片
package com.repositoryclient.treeview; import org.eclipse.jface.resource.ImageDescriptor; import org ...
- POJ3050 Hopscotch 【DFS】
Hopscotch Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 2113 Accepted: 1514 Descrip ...