From: Takahiro Kambe Date: 2000-09-05T01:03:03+09:00 Subject: [ruby-list:24748] Re: win32 Time zone In message on Tue, 5 Sep 2000 00:54:39 +0900, matz@zetabits.com (Yukihiro Matsumoto) wrote: > によって作っていますから、これが上記のような出力を返すとなる > と、NetBSDのstrftimeは%Zに対して常にローカルタイムゾーンを返 date(1)の方はソースを見ると、 case 'u': /* do everything in UTC */ (void)putenv("TZ=UTC0"); ちゅうことをしてますな。 > すと言うことなのでしょうか? あるいはgmtimeがゾーンに対する > 正しい情報を返していないのかも知れません。 gmtime(3)にはtm_zoneフィールドに関して、 The tm_zone and tm_gmtoff fields exist, and are filled in, only if arrangements to do so were made when the library containing these functions was created. There is no guar- antee that these fields will continue to exist in this form in future releases of this code. という記述があります。gmtime(3)が適合している規格としては、 ANSI X3.159-1989 (``ANSI C''). とのことです。 > strftimeなどは自前で持つべきか。 locale問題等でハマル可能性も大きい気がします。 -- 神戸 隆博(かんべ たかひろ) at home