ソフトウェア玄箱

時間を合わせる

時間がずれていたので、ntpdateで時間を合わせてみる。

ntpdateのインストール

$ sudo aptitude install ntpdate
Password:
Reading package lists... Done
Building dependency tree... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
Building tag database... Done
The following NEW packages will be installed:
ntpdate
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 58.9kB of archives. After unpacking 213kB will be used.
Writing extended state information... Done
Get:1 http://ftp2.jp.debian.org etch/main ntpdate 1:4.2.2.p4+dfsg-2 [58.9kB]
Fetched 58.9kB in 0s (129kB/s)
Selecting previously deselected package ntpdate.
(Reading database ... 17059 files and directories currently installed.)
Unpacking ntpdate (from .../ntpdate_1%3a4.2.2.p4+dfsg-2_arm.deb) ...
Setting up ntpdate (4.2.2.p4+dfsg-2) ...
$ date
Sun May 13 08:28:49 UTC 2007
$ sudo ntpdate 1.debian.pool.ntp.org
sudo: timestamp too far in the future: May 13 08:29:16 2007
12 May 14:30:36 ntpdate[27261]: adjust time server 76.168.30.201 offset -0.004099 sec
$ date
Sat May 12 14:30:38 UTC 2007
$

合わせたのにずれている…

タイムゾーンを設定する

/etc/default/rcSのUTCを下記のように変更する。

UTC=no

tzconfigコマンドでローカルタイムを変更する。

$ sudo tzconfig
Your current time zone is set to Unknown
Do you want to change that? [n]: y
Please enter the number of the geographic area in which you live:
1) Africa                       7) Australia
2) America                      8) Europe
3) US time zones                9) Indian Ocean
4) Canada time zones            10) Pacific Ocean
5) Asia                         11) Use System V style time zones
6) Atlantic Ocean               12) None of the above
Then you will be shown a list of cities which represent the time zone
in which they are located. You should choose a city in your time zone.
Number: 5
Aden Almaty Amman Anadyr Aqtau Aqtobe Ashgabat Ashkhabad Baghdad Bahrain
Baku Bangkok Beirut Bishkek Brunei Calcutta Choibalsan Chongqing Chungking
Colombo Dacca Damascus Dhaka Dili Dubai Dushanbe Gaza Harbin Hong_Kong
Hovd Irkutsk Istanbul Jakarta Jayapura Jerusalem Kabul Kamchatka Karachi
Kashgar Katmandu Krasnoyarsk Kuala_Lumpur Kuching Kuwait Macao Macau
Magadan Makassar Manila Muscat Nicosia Novosibirsk Omsk Oral Phnom_Penh
Pontianak Pyongyang Qatar Qyzylorda Rangoon Riyadh Riyadh87 Riyadh88
Riyadh89 Saigon Sakhalin Samarkand Seoul Shanghai Singapore Taipei
Tashkent Tbilisi Tehran Tel_Aviv Thimbu Thimphu Tokyo Ujung_Pandang
Ulaanbaatar Ulan_Bator Urumqi Vientiane Vladivostok Yakutsk Yekaterinburg
Yerevan
Please enter the name of one of these cities or zones
You just need to type enough letters to resolve ambiguities
Press Enter to view all of them again
Name: [] Tokyo
Your default time zone is set to 'Asia/Tokyo'.
Local time is now:      Sat May 12 23:38:00 JST 2007.
Universal Time is now:  Sat May 12 14:38:00 UTC 2007.
$ date
Sat May 12 23:38:04 JST 2007
$

できた!

タイトルとURLをコピーしました