# 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中时间的更改的更多相关文章

  1. linux中时间函数

    linux下常用时间类型有四种: time_t . struct   tm. struct  timeval .    struct   timespec 1.time_t   时间函数 time_t ...

  2. linux中时间精度的获取问题【转】

    转自:http://www.xuebuyuan.com/877633.html 目前项目需要,需要对时间进行基准,基准的精度在微秒.下午老刘给我说不能用do_gettimeofday因为他的精度虽然可 ...

  3. linux中时间命令详解

    DATE hling@hling:~$ date2018年 04月 11日 星期三 19:43:04 CSThling@hling:~$ date +%Y%M%d20184311hling@hling ...

  4. reinstall_xbt: Linux中如何查看文件的最初创建时间

    Linux中如何查看文件的最初创建时间 与文件相关的几个时间: 1.访问时间,读一次这个文件的内容,这个时间就会更新.比如对这个文件使用more命令.ls.stat命令都不会修改文件的访问时间.   ...

  5. 5 个在 Linux 中管理文件类型和系统时间的有用命令

    对于想学习 Linux 的初学者来说要适应使用命令行或者终端可能非常困难.由于终端比图形用户界面程序更能帮助用户控制 Linux 系统,我们必须习惯在终端中运行命令.因此为了有效记忆 Linux 不同 ...

  6. 在Linux中,没有文件创建时间的概念。只有文件的访问时间、修改时间、状态改变时间

    在Linux中,没有文件创建时间的概念.只有文件的访问时间.修改时间.状态改变时间.也就是说不能知道文件的创建时间.但如果文件创建后就没有修改过,修改时间=创建时间:如果文件创建后,状态就没有改变过, ...

  7. linux 中更改用户权限和用户组的命令chmod,chgrp实例

    linux 中更改用户权限和用户组的命令实例; 增加权限给当前用户 chmod +wx filename chmod -R 777 /upload 用户组 chgrp -R foldname zdz ...

  8. linux 中如何修改时间 date

    修改linux的时间可以使用date指令  修改日期: 时间设定成2009年5月10日的命令如下: #date -s 05/10/2009  修改时间: 将系统时间设定成上午10点18分0秒的命令如下 ...

  9. Linux中如何查看文件的最初创建时间

    查看 一个文件的 最初创建时间: Linux中如何查看文件的最初创建时间  linux     目前Linux没有直接查看创建文件的命令,你只能通过文件是否被修改过来进行判断. //查看代码stat  ...

随机推荐

  1. phoenix与spark整合

    目的是将phoenix做存储,spark做计算层.这样就结合了phoenix查询速度快和spark计算速度快的优点.在这里将Phoenix的表作为spark的RDD或者DataFrames来操作,并且 ...

  2. winform基本控件----按钮

    这次来引用一个我们上课时候老师给的一个实验内容,来说一下winform程序设计中的按钮控件的使用.下面是我们老师给的实验内容. 实验目的: 掌握Winform的开发环境. 掌握窗体的创建和基本方法. ...

  3. Laravel学习笔记(六)数据库 数据库填充

    数据库驱动的应用程序往往需要预先填充数据到数据库,以便进行测试和演示. 什么是种子数据 种子数据就是必须要加载了应用程序才能正常运行的数据.大多数应用程序需要在开发.测试和生产中加载一些参考数据. 一 ...

  4. 53. Maximum Subarray

    Find the contiguous subarray within an array (containing at least one number) which has the largest ...

  5. 实用SQL

    下列语句部分是MsSql语句,不可以在access中使用.SQL分类: DDL—数据定义语言(CREATE,ALTER,DROP,DECLARE) DML—数据操纵语言(SELECT,DELETE,U ...

  6. Win32API界面库 - Project wheels 工程基础部分完成

    离上次发博文过去了好久,先是要忙一个机器人的项目,然后就是部门的事情和考试周复习,然后就到了考试周,趁着复习的间隙,拾起了寒假时候抄的界面库,修掉了从前的bug. bug1 控件显示问题 当初抄这个库 ...

  7. linux shell中的&& || 和()

    1. linux命令返回值介绍 shell 在执行某个命令时,会有一个返回值,该值保存在shell变量$?中.当$?为0时,表示命令执行成功:当$?为1时,表示命令执行失败. 2. && ...

  8. 通过SQL语句提取存储过程中的内容

    首先,列出服务器上所有数据库. -- 获取数据库列表 SELECT name FROM master.dbo.sysdatabases ORDER BY name 其次,这是一种让所有的用户从数据库中 ...

  9. Uart的Verilog建模

    开发工具:Quartus II 9.1: 仿真软件:Questa Sim 10.0c: 硬件平台:Terasic DE2-115(EP2C35F672C6): 外设:MAX3232: 3个工程文件:& ...

  10. java se the operation is not applicable to the current selection

    当新建某的类时,需要自动构建 set get方法时. 我们一般 会直接让Myeclipse自动生动.偶尔 .他会犯2. the operation is not applicable to the c ...