Merbでタイムゾーンを選択するためのプラグインを作りました。

USAGE:

Gem(genki-merb_timezone_select)をインストールして、dependencyを設定し、form_forブッロクの中で、以下のように使います。

   1    <%= timezone_select :timezone %>

以下のような感じの結果が得られます。

ss

posted by Png genki on Tue 6 Jan 2009 at 03:33

tzinfoで使われているTZInfo::TimezoneOffsetInfoクラスの情報が RDocの中に見つからなかったので、置いてある場所をメモ。

ちなみに、以下のようにする事で、所望のTZInfo::Timezoneオブジェクトから、utcに対するオフセット秒を取得できます。

   1  timezone.period_for_utc(Time.now).offset.utc_offset

posted by Png genki on Tue 6 Jan 2009 at 02:13
Contents
merb_timezone_selectプラグインを作りました
tzinfoのTZInfo::TimezoneOffsetInfoの情報
Comments
瀧内元気: MacOS版は以下にあります * [genki/ViMouse](https://githu... '23-1
KingofSmack: Here also good reads for this mobile applicatio... '14-5
Spencer: You don't have to re-compile it, this version w... '14-4
staiano: Any chance we can get a recompile for 10.9? '14-1
dsjf: https://gist.github.com/6bf1bf2c3cbb5eb6e7a7 これ... '13-1
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ