[TZInfo-users] GMT definitions
gpdambra at gmail.com
Wed Apr 16 07:56:56 EDT 2008
On Wed, Apr 16, 2008 at 12:52 PM, Philip Ross <phil.ross at gmail.com> wrote:
> On 16/04/2008, Gianpaolo D'Ambra <gpdambra at gmail.com> wrote:
> > I use this for generating my list:
> > <%= time_zone_options_for_select (current_user.time_zone,
> > TZInfo::Timezone.all_country_zones.sort) %>
> You need to specify the model parameter to make
> time_zone_options_for_select work with TZInfo:
> <%= time_zone_options_for_select(current_user.time_zone, nil,
> TZInfo::Timezone) %>
> The second parameter is actually a list of priority zones rather than
> the complete list, so does not need to be specified.
> > At the moment I didn't find anything better. "My wish" is to list only
> > '(GMT+02:00) *city*' but with th correct values, but I haven't found
> > anything googling. Could you help me?
> The above code will give you a list of all the timezones, but probably
> not in the format you want. You may want to take a look at the Rails
> TzinfoTimezone and TzTime plugins to see if they do what you need.
> Phil Ross
> http://tzinfo.rubyforge.org/ -- DST-aware timezone library for Ruby
> TZInfo-users mailing list
> TZInfo-users at rubyforge.org
thanks Phil! I have to specify a model! Now everything is working well!
Thank you very much for your help!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the TZInfo-users