1.首先查看时区:

swfsadmin@swfsubuntu:~$ date -R
Tue, 17 Dec 2013 18:23:01 +0800 如果要修改时区,执行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.
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 3.选择国家:中国 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 4.选择时区:北京时间 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 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 17 18:22:10 CST 2013.
Universal Time is now: Tue Dec 17 10:22:10 UTC 2013.
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 6.复制文件到/etc目录下 sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

Ubantu 更新时间方法的更多相关文章

  1. dede编辑文章不更新时间的方法

    在修改文章的时候,发现织梦DEDECMS5.7这个版本存在一个问题,修改文章的同时也修改了文章的发布时间,这个 功能可能有些人比较需要,但同时也有些站长朋友又不需要,因为我们编辑某个文章的时候,发现编 ...

  2. [转]Hibernate设置时间戳的默认值和更新时间的自动更新

    原文地址:http://blog.csdn.net/sushengmiyan/article/details/50360451 Generated and default property value ...

  3. Linux下更新时间

    方法一.使用命令 ntpdate time-a.nist.gov 方法二.本地安装ntpdate客户端 在本地安装ntpdate客户端,更新时用 ntpdate cn.pool.ntp.org 如果你 ...

  4. dedecms文章的更新时间问题 每次更改文章时间变成最新的

    dedecms 每次更改文章,更新时间这里每次改了后再来看又变成当前最新时间的了. 解决方法: 查找后台目录的 templets/article_edit.htm 这个文件. 然后打开,查找如下代码: ...

  5. Spring Date Jpa on update current_timestamp 自动维护创建时间和更新时间

    在数据库里设置默认值current_timestamp可以维护创建时间,设置on update current_timestamp 可以维护更新时间.在JPA中应该如何去做呢?这里还是以上篇Topic ...

  6. 应用canvas绘制动态时钟--每秒自动动态更新时间

    使用canvas绘制时钟 下文是部分代码,完整代码参照:https://github.com/lemoncool/canvas-clock,可直接下载. 首先看一下效果图:每隔一秒会动态更新时间 一. ...

  7. Hibernate设置时间戳的默认值和更新时间的自动更新

    Generated and default property values 生成的和默认的属性值 The database sometimes generates a property value, ...

  8. MTK NTP和NITZ更新时间的问题

    NITZ(Network Identity and Time Zone,网络标识和时区),是一种用于自动配置本地的时间和日期的机制,同时也通过无线网向移动设备提供运营商信息.NITZ是自从PHASE ...

  9. DedeCMS文章编辑不更新时间1970年1月1日

    在修改文章或者后期优化的时候,织梦dedecms5.7版本存在一个问题,修改文章的同时也修改了文章的发布时间,这个功能可能有些人比较需要,但同时也有些站长朋友又不需要,因为我们编辑某个文章的时候,发现 ...

随机推荐

  1. 01_Zookeeper简述

    [Zookeeper应用场景] zookeeper作为一个开源的分布式应用协调系统,已经用到了许多分布式项目中,用来完成统一命名服务.状态同步服务.集群管理.分布式应用配置项的管理等工作. [Zook ...

  2. jQuery无刷新上传之uploadify

    引自 文章 http://www.cnblogs.com/babycool/archive/2012/08/04/2623137.html 将文章里的代码整合在了一个解决方案里,直接可以下载测试,上代 ...

  3. C#——Visual Studio项目中的AssemblyInfo.cs文件包含的配置信息

    Visual Studio程序集项目中的AssemblyInfo.cs文件中的内容 using System.Reflection; using System.Runtime.CompilerServ ...

  4. 【Udacity】朴素贝叶斯

    机器学习就像酿制葡萄酒--好的葡萄(数据)+好的酿酒方法(机器学习算法) 监督分类 supervised classification Features -->Labels 保留10%的数据作为 ...

  5. 立即终止Sleep的线程

    在实际工作中,我们需要每隔几分钟从API取数. while(isRunning) { work(); Thread.Sleep(5*60*1000); } 如果设置isRunning=false,也需 ...

  6. ComboBox赋值ItemsSource数据源的时候会触发SelectionChanged改变事件的解决办法

    我用的方法是设置开关 bool flag = false;//默认开关关闭(全局变量) flag = false;在赋值数据源之前设置关闭box.ItemsSource = lstProperty;/ ...

  7. Web API 2 入门——使用ASP.NET Web API和Angular.js构建单页应用程序(SPA)(谷歌翻译)

    在这篇文章中 概观 演习 概要 由网络营 下载网络营训练包 在传统的Web应用程序中,客户机(浏览器)通过请求页面启动与服务器的通信.然后,服务器处理请求,并将页面的HTML发送给客户端.在与页面的后 ...

  8. Python学习---内置函数的学习

    内置函数 [Py3.5官方文档]https://docs.python.org/3.5/library/functions.html#abs Built-in Functions abs() dict ...

  9. impala安装笔记(Ubuntu)

    1.Override 1.With Impala, you can query data, whether stored in HDFS or Apache HBase – including SEL ...

  10. GO语言(五)项目搭建

    <sorter> |------<src>(手动添加,代码存放处) |------sorter.go         |------<algorithm> |--- ...