このページは福井県立大学の田中求之が2006年1月まで運用していた Mac のサーバ運用に関する会議室 「Web Scripter's Meeting」の記録です。情報が古くなっている可能性がありますのでご注意ください。 |
現在のシステムに設定されているGMTからの時差はどのように取得するので しょうか?また、TimeZoneの名前(JST)などはどのように取得するので しょうか? Macの内蔵時計の32bit Unsigned整数から、RFC850やRFC1123形式に変換した いのです。 使用言語はFutureBasicなので、田中先生のOSAXに同様のコマンドが用意され ているのは知っているのですが、AppleScriptではないので、使用できません。
田中求之 さんからのコメント
( Tuesday, January 06, 1998 12:14:34 )
Toolbox の ReadLocation を使えば、設定されている Time Zone を読み出せる はずです。 Inside Mac の OS Utilities に記述があります。 You can use the ReadLocation procedure to get information about a geographic location or time zone. PROCEDURE ReadLocation (VAR loc: MachineLocation); loc On return, the fields of the geographic location record containing the geographic location and the time-zone information. DESCRIPTION The ReadLocation procedure reads the stored geographic location and time zone of the Macintosh computer from extended parameter RAM and returns it in the loc parameter. You can get values for the latitude, longitude, daylight savings time (DST), or Greenwich mean time (GMT). If the geographic location record has never been set, all fields contain 0.
重松修 さんからのコメント
( Tuesday, January 06, 1998 15:13:22 )
いつも素早いフォローありがとうございます。 InsideMacintoshを見てアセンブラで、緯度や経度グリニッジ時間との時差 (秒数)を取得する事ができました。