Lupu 528でのTime Zoneの設定

以上のフォーラム以外のトラブル

モデレータ: 暇人, YoN, nyu

返信する
ムムム
記事: 30
登録日時: 08/08/24(日) 12:57
お住まい: ミシマシ

Lupu 528でのTime Zoneの設定

投稿記事 by ムムム »

Lupu 528を使い始めた際の時刻設定でのトラブルです。他のPuppyのスレッドでも多少掲載されていますが、まとめてみました。

*問題の記述:
Lupu 528はスタート時に TimeZone の選択肢が出てきます。この表示は GMT+8 とあるので(日本で正しくは GMT+9)つい変更してしまいます。日本標準時、Asia/Tokyoなどを選ぶと、その時点では右下の時刻が正しくでてきます。しかし、後日リブートすると時間も日付も一日狂った状態ででてきます。

*解決法:
TimeZoneの選択は GMT+8のままにする。敢えて変えるなら、GMT+9を選ぶ。

当初は何かの設定の間違いか、PCのハード依存か、と思われましたが英語版のサイトにかなり詳しい説明が載っていました。どうも Linux全般に共通でPuppy, Lupuに特有ではない、が一つの結論でもあります。
解決法もタマタマ見つけた、”触らない”でも良いようです。根本的な解決法は未だ変更が反映されていないかも知れません。Webサイトを検索した限りでは以下が現状のようです。大半が英文のコピーですので、適当に読み飛ばしてください。

*問題の事例*
Q1) I am now in Lupu528 and it shows the wrong time every time I boot up.
I told it to use Stockholm, Berlin, Paris, time which is GMT +1 hour. but when I boot it is one hour more. I use the set time and set it to correct time and next day it is one hour wrong in same way. Any idea?

A1) The code in /usr/sbin/timezone-set is wrong . In case of GMT the script reverts - to + and vice versa . In fact quite the reverse is true .
The timezone is part of the Gnu GLIBC and might had been wrong once before Puppy 4 series but now it seems ok .
(Puppy 4シリーズでエラーがあったがその後修正が入った)(特に顕在化していなかった)

The /usr/sbin/timezone-set is also part now of quicksetup and had many locale adjustments but this part is still left to revert the GMT from - to + .
(Lupu528で使う quicksetup で戻ってしまった)

This had been posted in the murga bug section not too long ago , without being recognized by BK ,
I have actually commented this reverting part in the code , which occurs two times there iirc .
I have not downloaded any of the pemasu Puppies yet , so can not check if the code is different there .
(Barry氏が気付いていないようだ、とのコメントも)

*事例2*
Q2) In my case, the time zone shown was wrong.
If I use Menu/Settings/Set Timezone to correct it, I succeed only if I specify my time zone as Europe/Athens. If I specify it as GMT+2 and then check it running the date command, the system reports a GMT-2 time zone. If I subsequently use Menu/Settings/P-Sync Time Server Synchroniser, I get into a real mess as the time set changes in the process.

A2)
I spent some time checking Psyncs operation against the zoneinfo.
If, for instance you set your time zone using GMT with offset. i.e. GMT+4 then the following confusion occurs.

If you set your hardware time in a terminal using " hwclock --utc " then obviously it will set to UTC, BUT and it's a confusing one, the time reported in the terminal by hwclock is in localtime.

Yes that's right, localtime !! Even though you have just used the command, it illogically reports back in localtime from the zoneinfo to the terminal.

However the tray clock will show UTC plus the offset! Which is correct.
This can be most confusing for some.

* 答の一つ
Perhaps I should change the header to "True offset to UTC" to explain it better.
(Rob)
これは”header"が誤解を招いているので、header を変えればいい(ユーザーは何もしない、の意味にもなります)。

*更に
It reads the zoneinfo and reports what it finds there. Zoneinfo has reverse notation, this is the Unix standard, not Puppy's fault.

と、根本は Unix Standard まで戻る話になってきます。

GMT+1 always means +1 hour , not east of Greenwich and the same for GMT-1
The script /usr/sbin/timezone-set changes GMT+[0-9]* to GMT-[0-9]* and vice versa .

Having had the timezone to GMT-1 the date command showed the "correct BIOS local time" .

The time zone is a little bit problematic @boot , because the correct local BIOS time is ignored by the kernel first and somehow gets adjusted after the drivers get loaded .

Puppy kernels have not much rtc drivers enabled by default . The most annoying thing is that the mount time of a partition gets not notified correctly to the superblock of the partition and running a fsck on the partition 4 hours later for example would say something like "Superblock last mount time is in the future , adjust ? (y)" or similar .

色々、コメント、議論があるようですがユーザーとしては当面 ”触らぬ timezone"で十分かと。
ご参考に。
MuMuMu
アバター
シノバー
記事: 3139
登録日時: 09/03/21(土) 00:05
連絡する:

Re: Lupu 528でのTime Zoneの設定

投稿記事 by シノバー »

ムムム さんが書きました:LLupu 528はスタート時に TimeZone の選択肢が出てきます。この表示は GMT+8 とあるので(日本で正しくは GMT+9)つい変更してしまいます。日本標準時、Asia/Tokyoなどを選ぶと、その時点では右下の時刻が正しくでてきます。しかし、後日リブートすると時間も日付も一日狂った状態ででてきます。
GMTの+か−かの解釈がGtkのバージョンによって異なるというのは知りませんでした。情報ありがとうございます。Barryさんもそのことに気付いたらしく、最新のビルド(Wary/Racy-5.2.2.7など)ではデフォルトを GMT+8 ではなく Astearia/Perth にしています。

すなわち問題は GMT+-にあるので、JST(日本標準時、Asia/Tokyo)に設定すれば何の問題もないはずです。さきに投稿したように私のところでは Lupu-528 + lang_pack_ja-1.4.sfs で JST, localtime 設定で問題は出ていません(その環境から投稿しています)。
The bar master, Shino's Bar
http://shinobar.net/
アバター
シノバー
記事: 3139
登録日時: 09/03/21(土) 00:05
連絡する:

Re: Lupu 528でのTime Zoneの設定

投稿記事 by シノバー »

すなわち問題は GMT+/-にある
そういう問題ではないようです。本家フォーラムで報告されていた問題はサマータイムの扱いにあるのではないかと私は疑っています。

たしかに Timezoneデータの GMT の+か−かの解釈には問題があります。 しかしこれは GtkやGLIBCの問題ではなく、少なくとも Pupy-431 と Lupu-528 でこの点に相違はありません。
タイムゾーンをいじってもデスクトップの時計はいつも同じです。ですがファイルのタイムスタンプに影響があります。そこで次のような実験をします。Lupu-528 + lang_pack_ja-1.4.sfs 内蔵HDDへの Frugal インストール。(ムムムさんが経験した問題は、もしかしたらフラッシュメモリにインストールした場合に起こるのかも。)

手順:
  1. 最初はタイムゾーン JSTで出発
  2. touchコマンドでサイズ0のファイルを作る
  3. dateコマンドで時刻を印字
  4. statコマンドでさきのファイルのタイムスタンプを見る
  5. Contry wizard でタイムゾーンを GMT-9 Alaska に設定、Xを再起動
  6. dateコマンドで時刻表示、statコマンドでタイムスタンプを見る
  7. Contry wizard でタイムゾーンを GMT+9 Tokyo に設定、Xを再起動
  8. dateコマンドで時刻表示、statコマンドでタイムスタンプを見る
結果: JSTで作ったファイルを GMT-9 Alaska でタイムスタンプを見ると 18時間(9x2)ずれて表示される。
GMT+9 Tokyo で見たタイムスタンプは JSTで表示されるものと同じ。
なお、GMT+/ーで設定したとき dateコマンドで表示されるのと statコマンドで表示されるものとは +/ー の符号が逆転している。
結論: Contry wizard で GMT+/ー に参考として表示される地名は(サマータイムの扱いを除き)正しい。

詳細:
タイムゾーン設定は JST

コード: 全て選択

# touch milestone
# date
2012年  2月 26日 日曜日 22:08:39 JST
# stat milestone
  File: `milestone'
  Size: 0         	Blocks: 0          IO Block: 4096   regular empty file
Device: bh/11d	Inode: 10537       Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2012-02-26 22:08:36.000000000 +0900
Modify: 2012-02-26 22:08:36.000000000 +0900
Change: 2012-02-26 22:08:36.000000000 +0900
タイムゾーン設定は GMT-9
date コマンドは設定とは逆の GNT+9 を表示。タイムスタンプは -0900 で、 JSTで表示されるものと 18時間ずれて表示される。

コード: 全て選択

# date
2012年  2月 26日 日曜日 22:10:02 GMT+9
# stat milestone
  File: `milestone'
  Size: 0         	Blocks: 0          IO Block: 4096   regular empty file
Device: bh/11d	Inode: 10537       Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2012-02-26 04:08:36.000000000 -0900
Modify: 2012-02-26 04:08:36.000000000 -0900
Change: 2012-02-26 04:08:36.000000000 -0900
タイムゾーン設定は GMT+9
date コマンドは設定とは逆の GNT-9 を表示。タイムスタンプは +0900 で、 JSTで表示されるものと同じ。

コード: 全て選択

# date
2012年  2月 26日 日曜日 22:12:33 GMT-9
# stat milestone
  File: `milestone'
  Size: 0         	Blocks: 0          IO Block: 4096   regular empty file
Device: bh/11d	Inode: 10537       Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2012-02-26 22:08:36.000000000 +0900
Modify: 2012-02-26 22:08:36.000000000 +0900
Change: 2012-02-26 22:08:36.000000000 +0900
最後に編集したユーザー シノバー [ 12/02/26(日) 23:38 ], 累計 1 回
The bar master, Shino's Bar
http://shinobar.net/
アバター
シノバー
記事: 3139
登録日時: 09/03/21(土) 00:05
連絡する:

Re: Lupu 528でのTime Zoneの設定

投稿記事 by シノバー »

シノバー さんが書きました:タイムゾーンをいじってもデスクトップの時計はいつも同じです。ですがファイルのタイムスタンプに影響があります。そこで次のような実験をします。
さきの実験はちょっと込み入ってました。もっと単純に date コマンドだけでやる方法が分かりやすそうです。date -u コマンドの結果が正しくUTCを表示しているかどうかで判定できます。なお、date と date -R とでは +/-が逆転します。

設定は JST

コード: 全て選択

# date
2012年  2月 26日 日曜日 23:06:41 JST
# date -u
2012年  2月 26日 日曜日 14:06:44 UTC
# date -R
Sun, 26 Feb 2012 23:06:51 +0900
設定は GMT-9 Alaska

コード: 全て選択

# date
2012年  2月 26日 日曜日 23:12:23 GMT+9
# date -u
2012年  2月 27日 月曜日 08:12:26 UTC
# date -R
Sun, 26 Feb 2012 23:12:31 -0900
設定は GMT+9 Tokyo

コード: 全て選択

# date
2012年  2月 26日 日曜日 23:15:40 GMT-9
# date -u
2012年  2月 26日 日曜日 14:15:42 UTC
# date -R
Sun, 26 Feb 2012 23:15:45 +0900
The bar master, Shino's Bar
http://shinobar.net/
アバター
シノバー
記事: 3139
登録日時: 09/03/21(土) 00:05
連絡する:

Time Zoneの設定とタイムスタンプ

投稿記事 by シノバー »

ムムム さんが書きました:ユーザーとしては当面 ”触らぬ timezone"で十分かと。
タイムスタンプが狂うので他のPCとファイル交換したり、同じPC内でもデュアルブートでは問題が起こり得ます。

またメールのタイムスタンプは date -R で表示される rfc-2822 で規定されたものになります。
妙な設定にすると、 メールが未来からやってきたり、あるいはかなり時間がずれてやって来ることになります。これは国内同士のメールのやりとりであっても同じです。デフォルトの GMT+8との差はたった1時間ですが、受け取ったメーラーは rfc-2822 で規定されたタイムスタンプでソートするので、あとから見ると問い合わせよりも返事のほうが先に帰って来るということが起こります(普通はどのメールに対する返事かという情報が付けられるので、あまり問題ではないかもしれないが)。メールを使う方は要注意です。
The bar master, Shino's Bar
http://shinobar.net/
返信する