Hi,

On Wed, Apr 16, 2008 at 12:52 PM, Philip Ross <[EMAIL PROTECTED]> wrote:

> Hi,
>
> On 16/04/2008, Gianpaolo D'Ambra <[EMAIL PROTECTED]> 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.
>
> Regards,
>
> Phil
>
> --
> Phil Ross
> http://tzinfo.rubyforge.org/ -- DST-aware timezone library for Ruby
> _______________________________________________
> TZInfo-users mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/tzinfo-users
>


thanks Phil! I have to specify a model! Now everything is working well!
Thank you very much for your help!

Bye

Gp
_______________________________________________
TZInfo-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/tzinfo-users

Reply via email to