linux中时间的更改
# 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) Beijing Time
2) Xinjiang Time
#? 1The following information has been given:
China
Beijing Time
Therefore TZ='Asia/Shanghai' will be used.
Local time is now: Thu Apr 21 16:12:41 CST 2016.
Universal Time is now: Thu Apr 21 08:12:41 UTC 2016.
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
依次选择 亚洲 中国 北京时间
# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime (复制文件到/etc目录下)
# ntpdate time.windows.com (更新时间)
如果ntpdate命令找不到 可以安装ntp套件
yum -y install ntp
# hwclock -w (写入硬件)
# reboot 重启服务器 打印时间检验是否与选择时间相一致
linux中时间的更改的更多相关文章
- linux中时间函数
linux下常用时间类型有四种: time_t . struct tm. struct timeval . struct timespec 1.time_t 时间函数 time_t ...
- linux中时间精度的获取问题【转】
转自:http://www.xuebuyuan.com/877633.html 目前项目需要,需要对时间进行基准,基准的精度在微秒.下午老刘给我说不能用do_gettimeofday因为他的精度虽然可 ...
- linux中时间命令详解
DATE hling@hling:~$ date2018年 04月 11日 星期三 19:43:04 CSThling@hling:~$ date +%Y%M%d20184311hling@hling ...
- reinstall_xbt: Linux中如何查看文件的最初创建时间
Linux中如何查看文件的最初创建时间 与文件相关的几个时间: 1.访问时间,读一次这个文件的内容,这个时间就会更新.比如对这个文件使用more命令.ls.stat命令都不会修改文件的访问时间. ...
- 5 个在 Linux 中管理文件类型和系统时间的有用命令
对于想学习 Linux 的初学者来说要适应使用命令行或者终端可能非常困难.由于终端比图形用户界面程序更能帮助用户控制 Linux 系统,我们必须习惯在终端中运行命令.因此为了有效记忆 Linux 不同 ...
- 在Linux中,没有文件创建时间的概念。只有文件的访问时间、修改时间、状态改变时间
在Linux中,没有文件创建时间的概念.只有文件的访问时间.修改时间.状态改变时间.也就是说不能知道文件的创建时间.但如果文件创建后就没有修改过,修改时间=创建时间:如果文件创建后,状态就没有改变过, ...
- linux 中更改用户权限和用户组的命令chmod,chgrp实例
linux 中更改用户权限和用户组的命令实例; 增加权限给当前用户 chmod +wx filename chmod -R 777 /upload 用户组 chgrp -R foldname zdz ...
- linux 中如何修改时间 date
修改linux的时间可以使用date指令 修改日期: 时间设定成2009年5月10日的命令如下: #date -s 05/10/2009 修改时间: 将系统时间设定成上午10点18分0秒的命令如下 ...
- Linux中如何查看文件的最初创建时间
查看 一个文件的 最初创建时间: Linux中如何查看文件的最初创建时间 linux 目前Linux没有直接查看创建文件的命令,你只能通过文件是否被修改过来进行判断. //查看代码stat ...
随机推荐
- arcgis server 10.2安装后,忘记Manager的用户名和密码
arcgis server 10.2安装完毕后,需要创建站点,创建站点时,填写管理站点的用户名和密码.自己不小心,创建完毕后,给忘记了用户名和密码.求助Esri,解决方法如下: (1)找到arcgis ...
- json_encode和json_decode
<?php $json = '{"a":1,"b":2,"c":3,"d":4,"e":5}' ...
- Java事务处理全解析(八)——分布式事务入门例子(Spring+JTA+Atomikos+Hibernate+JMS)
在本系列先前的文章中,我们主要讲解了JDBC对本地事务的处理,本篇文章将讲到一个分布式事务的例子. 请通过以下方式下载github源代码: git clone https://github.com/d ...
- Android Gradle 多Module单独编译一个Module
假如项目中有两个Module,app1和app2.假如我只想对app1 module进行build,则可以: gradle :App1:build build命令可以换成任意gradle命令.
- Android学习笔记(三)
在手机应用中菜单是很重要的一部分,它能够以直观的界面让用户去选择,现在我们学习如何去新建一个菜单. 首先在res目录下新建一个menu文件夹,然后在menu文件夹下新建一个Android XML Fi ...
- 1 、Linux-Rhel6终端介绍-Shell提示符
1.Linux 终端介绍 tty-控制台终端: RHEL6 tty1-tty6 tty就是图形界面 从图形界面切换到字符界面: ctrl+shift+alt +F2~F6 从字符界面切换图形或字符: ...
- NserviceBus+rabbitmq
Ok so I figured this out after looking a bit at the code and the requirements for amqp URI and it sh ...
- 使用ADD_CUSTOM_COMMAND 添加自定义命令
e.g. ADD_CUSTOM_COMMAND( TARGET world_server COMMAND cp ${CMAKE_SOURCE_DIR}/CMak ...
- 就是这么简单(续)!使用 RestAssuredMockMvc 测试 Spring MVC Controllers
就是这么简单(续)!使用 RestAssuredMockMvc 测试 Spring MVC Controllers 转载注明出处:http://www.cnblogs.com/wade-xu/p/43 ...
- (String) 205.Isomorphic Strings
Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the chara ...