改时区参考

http://blog.sina.com.cn/s/blog_6c9d65a1010145st.html

1.首先查看时区:

swfsadmin@swfsubuntu:~$ date -R
Tue, Dec :: +

如果要修改时区,执行sudo tzselect

2.选择区域:亚洲

swfsadmin@swfsubuntu:~$ sudo tzselect
[sudo] password for swfsadmin:
Sorry, try again.
[sudo] password for swfsadmin:
Please identify a location so that time zone rules can be set correctly.
Please select a continent or ocean.
) Africa
) Americas
) Antarctica
) Arctic Ocean
) Asia
) Atlantic Ocean
) Australia
) Europe
) Indian Ocean
) Pacific Ocean
) none - I want to specify the time zone using the Posix TZ format.
#?

3.选择国家:中国

Please select a country.
) Afghanistan ) Israel ) Palestine
) Armenia ) Japan ) Philippines
) Azerbaijan ) Jordan ) Qatar
) Bahrain ) Kazakhstan ) Russia
) Bangladesh ) Korea (North) ) Saudi Arabia
) Bhutan ) Korea (South) ) Singapore
) Brunei ) Kuwait ) Sri Lanka
) Cambodia ) Kyrgyzstan ) Syria
) China ) Laos ) Taiwan
) Cyprus ) Lebanon ) Tajikistan
) East Timor ) Macau ) Thailand
) Georgia ) Malaysia ) Turkmenistan
) Hong Kong ) Mongolia ) United Arab Emirates
) India ) Myanmar (Burma) ) Uzbekistan
) Indonesia ) Nepal ) Vietnam
) Iran ) Oman ) Yemen
) Iraq ) Pakistan
#?

4.选择时区:北京时间

Please select one of the following time zone regions.
) east China - Beijing, Guangdong, Shanghai, etc.
) Heilongjiang (except Mohe), Jilin
) central China - Sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc.
) most of Tibet & Xinjiang
) west Tibet & Xinjiang
#?

5.确认验证:

The following information has been given:

        China
east China - Beijing, Guangdong, Shanghai, etc. Therefore TZ='Asia/Shanghai' will be used.
Local time is now: Tue Dec :: CST .
Universal Time is now: Tue Dec :: UTC .
Is the above information OK?
) Yes
) No
#? 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
6.复制文件到/etc目录下
sudo cp /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime
7.更新时间
sudo ntpdate time.windows.com

改时间参考:

http://5154091.blog.hexun.com/30735220_d.html

修改时间

sudo date -s MM/DD/YY //修改日期
sudo date -s hh:mm:ss //修改时间

在修改时间以后,修改硬件CMOS的时间

sudo hwclock --systohc //非常重要,如果没有这一步的话,后面时间还是不准

http://www.cnblogs.com/php5/archive/2011/02/15/1955432.html

http://os.51cto.com/art/200908/142234.htm

ubuntu修改时区和时间的方法的更多相关文章

  1. Ubuntu修改时区和时间

    1.查看当前时区 date -R 返回显示是 +0000 2.修改时区 tzselect 然后提示选择时区,按顺序选4.9.1,然后确认选1 3.更新本地时区 sudo cp /usr/share/z ...

  2. Ubuntu 修改时区和时间

    tzselect #根据提示选择时区 sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime #把设置好的时区文件粘贴到 /etc/local ...

  3. 修改linux系统时间的方法(date命令)

    修改linux系统时间的方法(date命令) 来源:互联网 作者:佚名 时间:11-18 23:22:27 [大 中 小] date命令不仅可以显示系统当前时间,还可以用它来修改系统时间,下面简单的介 ...

  4. Ubuntu修改时区和更新时间

    先查看当前系统时间 root@ubuntu:/# date -R 结果时区是:-0500 我需要的是东八区,这儿显示不是,所以需要设置一个时区 1.运行tzselect root@ubuntu:/# ...

  5. ubuntu下如何修改时区和时间

    1.修改时区 sudo tzselect (按提示选择即可) sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 2. 修改时间 sudo ...

  6. centos修改时区,设置时间

    在我们使用CentOS系统的时候,也许时区经常会出现问题,有时候改完之后还是会出错,下面我们就来学习一种方法来改变这个状况.如果没有安装,而你使用的是 CentOS系统 那使用命令 yum insta ...

  7. mysql修改时区的几种方法(转载自https://www.cnblogs.com/shiqiangqiang/p/8393662.html)

    说明: 以下记录修改mysql时区的几种方法. 具体: 方法一:通过mysql命令行模式下动态修改 1.1 查看mysql当前时间,当前时区 select curtime(); #或select no ...

  8. ubuntu系统调整时区和时间

    date: 2019-05-30  10:14:23 author:headsen  chen 个人原创博客,转录需要注明作者和出处. 1,安装ntpdate,同步标准时间 root@hk-confl ...

  9. mysql修改时区的几种方法

    说明: 以下记录修改mysql时区的几种方法. 具体:方法一:通过mysql命令行模式下动态修改1.1 查看mysql当前时间,当前时区 > select curtime(); #或select ...

随机推荐

  1. C# 常用控件属性及方法介绍

      C#常用控件属性及方法介绍                                               目录 1.窗体(Form) 2.Label (标签)控件 3.TextBox ...

  2. Phantomjs 抓取、分析某个页面加载时浏览器发起的所有的子请求

    var page = require('webpage').create(), system = require('system'), address; if (system.args.length ...

  3. Visual Studio 2013更新内容简介

    前言 VS2013终于发布了,虽然之前自己使用VS2010和VS2012的时间也不长,尤其是VS2012这自己刚刚也没用多久,看到VS2013发布了,自己忍不住也下载了下来,官网肯定可以下载,不过自己 ...

  4. ajax请求成功但不执行success-function回调函数的问题

    在success:function(data){}下面加个error:function(){},看看是不是出错了走了error.如果是,说明返回值类型不符合要求. 比如:下面代码返回String类型. ...

  5. tomcat启动报错:Injection of autowired dependencies failed

    tomcat启动报错:Injectjion of autowired dependencies failed 环境: 操作系统:centos6.5 tomcat: 7.0.52 jdk:openjdk ...

  6. 一个简单的Java程序

    一个.NET技术还是很菜的水平的猿人现在要去学习Java不知道是坏是好,无从得知啊! 不过在网上看了好多Java方面的简单例子,感觉Java还是蛮不错的么!不管以后怎么样啦,先开始自己的Java菜鸟之 ...

  7. ERP客户关系渠管理添加和修改联系人(二十一)

    树形结构treeview 前端代码: <form id="form1" runat="server"> <div> <asp:Tr ...

  8. BootStrap fileinput.js文件上传组件实例代码

    1.首先我们下载好fileinput插件引入插件 ? 1 2 3 <span style="font-size:14px;"><link type="t ...

  9. SprintBoot 1.2.8 入门

    现在SpringBoot官网Quick Start的版本是1.5.3,试了一下,报错说我JDK版本太低,查了一下说是需要JDK8,所以我使用了旧版本1.2.8,实际上在POM中的依赖配置方式一样的. ...

  10. windows10系统定时1分钟执行php(不借助windows的.bat文件)原创

    第一步:确认windows上是否配置好了php环境变量,我用xampp安装的lamp环境,默认已经配置好了php的环境变量.在CMD中执行php -v  显示相应的php版本 php -v 如果显示上 ...