[TZInfo-users] GMT definitions

Gianpaolo D'Ambra gpdambra at gmail.com
Wed Apr 16 07:56:56 EDT 2008


Hi,

On Wed, Apr 16, 2008 at 12:52 PM, Philip Ross <phil.ross at gmail.com> wrote:

> Hi,
>
> 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.
>
> Regards,
>
> Phil
>
> --
> Phil Ross
> http://tzinfo.rubyforge.org/ -- DST-aware timezone library for Ruby
> _______________________________________________
> TZInfo-users mailing list
> TZInfo-users at rubyforge.org
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/tzinfo-users/attachments/20080416/e61c121d/attachment.html 


More information about the TZInfo-users mailing list