Tzinfo_timezone

Hi,

I tried installing the tzinfo_timezone plugin (and the tzinfo gem) in
my rails 2.1 application. Now calls to date_select fail with: wrong
number of arguments (3 for 2).

Removing the tzinfo_timezone plugin fixes everything, but then, of
course, I’m left without DST support.

The first part of the application trace follows:

/Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/
core_ext/time/zones.rb:63:in initialize' /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/ core_ext/time/zones.rb:63:increate’
/Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/
core_ext/time/zones.rb:63:in get_zone' /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/ core_ext/time/zones.rb:81:insend!’
/Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/
core_ext/time/zones.rb:81:in in_time_zone' /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/ values/time_zone.rb:253:innow’
/Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/
core_ext/time/zones.rb:51:in current' /Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/ date_helper.rb:678:indefault_time_from_options’
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/
date_helper.rb:618:in date_or_time_select' /Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/ date_helper.rb:602:into_date_select_tag_without_error_wrapping’
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/
active_record_helper.rb:239:in to_date_select_tag' /Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/ date_helper.rb:156:indate_select’
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/
date_helper.rb:699:in date_select' app/views/participants/_edit_profile.html.erb:73:in_run_erb_47app47views47participants47_edit_profile46html46erb’
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/
form_helper.rb:317:in fields_for' /Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/ form_helper.rb:253:inform_for’
app/views/participants/_edit_profile.html.erb:3:in
`_run_erb_47app47views47participants47_edit_profile46html46erb’

Cheers,
Ricky

On 12 Sep 2008, at 04:56, Ricky wrote:

Hi,

I tried installing the tzinfo_timezone plugin (and the tzinfo gem) in
my rails 2.1 application. Now calls to date_select fail with: wrong
number of arguments (3 for 2).

Could this be conflicting with the timezone stuff in rails 2.1 ?

Fred

Fred, you’re everywhere, man! And, yes, you’re spot on…

Could this be conflicting with the timezone stuff in rails 2.1 ?

The problem is that there is no problem. Apparently Rails 2.1 already
handles daylight savings properly (tzinfo gem is already bundled), and
using tzinfo_timezone just screws things up:
http://mad.ly/2008/04/09/rails-21-time-zone-support-an-overview/.

Ricky