I just had the same problem and solved it by either :
- modify the datatype of my DB attribute from datetime to date (if tou
want to store date)
OR
- convert your data from date to datetime, by using to_datetime (if you
want to store datetime)
Hope it helps
Tomberry
Sharkie Landshark wrote:
> I did properly migrate to Rails 3. I no longer have
> Rails::Initializer.run do |config|
>
> Inside class Application < Rails::Application is the only place I have
> config.time_zone = 'Bangkok'
>
> I restarted a few times as well.
>
> Sharkie
>
>
> Jeffrey L. Taylor wrote:
>> Did you restart your server? Did you properly migrate
>> config/environment.rb
>> to config/application.rb. I.e., change
>>
>> Rails::Initializer.run do |config|
>> config.time_zone = 'Bangkok'
>> end
>>
>> to:
>>
>> # config/application.rb
>> module YourApplicationName
>> class Application < Rails::Application
>> config.time_zone = 'Bangkok'
>> end
>> end
>>
>> It sounds you haven't completed the migration completely.
>>
>> Jeffrey
>>
>>
>> Quoting Sharkie Landshark <lists@ruby-forum.com>:
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment