Ubuntu10.10时间/时区设置
2014-04-09 19:26
330 查看
转自:http://xenojoshua.com/2011/04/ubuntu10-10-date-timezone/
搞了好半天,其实现在还是没怎么搞懂如何设置时间/时区。不管了,直接写如何调整。
首先是时区,试了下命令:tzconfig。结果系统提示:
WARNING: the tzconfig command is deprecated, please use: dpkg-reconfigure tzdata
然后使用命令 dpkg-reconfigure tzdata,居然是图形界面,太棒了。。。直接选择了Asia和Shanghai,结束了。date了下,时区设置成了CST(China Standard Time)。
接下来是如何用date设时间,有个老外写的东西不错,拿来看下:
type in the following command, replacing nn with the two-digit month (01 – 12), dd with the two-digit day, hh with the two-digit hour (00 – 23), mm with the two-digit minute (00 – 59). Optionally, you can then follow that
with either a two-digit or four-digit year, and/or the two-digit second. If you’re adding the seconds, put a . (period) before the seconds.
date nnddhhmmyy.ss
For instance, to set the date/time for May 19th, 2007, 6:00pm (and 0 seconds), you would type:
date 051918002007.00
最后设置下ntpdate来与服务器同步时间:ntpdate cn.pool.ntp.org
cn.pool.ntp.org是位于中国的公共NTP服务器,用来同步你的时间。
使用date -s “month/day/year hour:minute:second”来设定时间。
e.g. date -s “06/07/2011 16:37:00″
搞了好半天,其实现在还是没怎么搞懂如何设置时间/时区。不管了,直接写如何调整。
首先是时区,试了下命令:tzconfig。结果系统提示:
WARNING: the tzconfig command is deprecated, please use: dpkg-reconfigure tzdata
然后使用命令 dpkg-reconfigure tzdata,居然是图形界面,太棒了。。。直接选择了Asia和Shanghai,结束了。date了下,时区设置成了CST(China Standard Time)。
接下来是如何用date设时间,有个老外写的东西不错,拿来看下:
type in the following command, replacing nn with the two-digit month (01 – 12), dd with the two-digit day, hh with the two-digit hour (00 – 23), mm with the two-digit minute (00 – 59). Optionally, you can then follow that
with either a two-digit or four-digit year, and/or the two-digit second. If you’re adding the seconds, put a . (period) before the seconds.
date nnddhhmmyy.ss
For instance, to set the date/time for May 19th, 2007, 6:00pm (and 0 seconds), you would type:
date 051918002007.00
最后设置下ntpdate来与服务器同步时间:ntpdate cn.pool.ntp.org
cn.pool.ntp.org是位于中国的公共NTP服务器,用来同步你的时间。
使用date -s “month/day/year hour:minute:second”来设定时间。
e.g. date -s “06/07/2011 16:37:00″
相关文章推荐
- ubuntu server设置时区和更新时间
- ubuntu设置时区 更新时间 以及 修正CMOS的时间
- ubuntu server设置时区和更新时间
- Ubuntu设置时区和更新时间
- ubuntu之设置时区和在线同步时间
- ubuntu server设置时区和更新时间
- ubuntu设置时区为美国中部时间西六区
- ubuntu时区选择与时间设置
- ubuntu设置时区为美国中部时间西六区
- ubuntu设置时区,网上同步时间
- ubuntu设置时区,网上同步时间
- ubuntu设置时区,网上同步时间
- ubuntu设置时区,网上同步时间
- 【Ubuntu日常技巧】Ubuntu命令行设置系统时区、时间
- ubuntu server设置时区和更新时间
- ubuntu设置时区,网上同步时间
- ubuntu设置时区,网上同步时间
- ubuntu之设置时区和在线同步时间
- Ubuntu14.04-X64-Server版时区,时间重新设置-tzselect的使用