Found a plugin which aims to address localization and delocalization, but may be useful for this problem:
http://github.com/clemens/delocalize On Oct 12, 8:02 am, johne <[email protected]> wrote: > It appears this is the issue. > > http://slightlycoded.com/blog/ruby-1-9-date-problems > > What is the preferred way to fix this in ruby 1.9 and rails? > > On Oct 10, 12:43 pm, johne <[email protected]> wrote: > > > > > I am running into the same issue. I have confirmed it works properly > > on rails 3 and ree 1.8.7, but not on rails 3, ruby 1.9.2 (I am > > wanting US formatteddatestrings) > > > [ruby-1.9.2] rails console > > Loading development environment (Rails 3.0.0) > > > >> Offer.last.update_attributes(:publish_start => '31/10/10') > > => true > > >> Offer.last.update_attributes(:publish_start => '10/31/10') > > => false > > >> exit > > > [ree-1.8.7] rails console > > Loading development environment (Rails 3.0.0)>> > > Offer.last.update_attributes(:publish_start => '31/10/10') > > => false > > >> Offer.last.update_attributes(:publish_start => '10/31/10') > > > => true > > > On Oct 9, 10:42 pm, Scott Griffin <[email protected]> wrote: > > > > Yannick Yanikos wrote: > > > > Hello, > > > > > I have a problem withdatewhen saving into my sql with rails 3. > > > > > Into my environment.rb file i putDate::DATE_FORMATS[:default] = > > > > "%d/%m/%Y" > > > > > i created a jquery calendar and into the text field thedateis for > > > > example 01/10/2010. > > > > When i save, thedatesaved is 10/01/2010. the monthes and the days are > > > > inversed. > > > > > into the log parameter is : "birthday"=>"01/10/2010" > > > > > and the update (db) : UPDATE `profiles` SET `birthday` = '2010-01-10' > > > > ... > > > > > format is saved as MM/DD/YYYY > > > > > Does anyone know how to make this work ? > > > > > Thank you. > > > > I have encountered the same issue using Ruby 1.9.2. However, when I > > > switch back to Ruby 1.8.7, the issue is no longer present. What version > > > of Ruby are you using? If you use 1.8.7, do you experience the same > > > behavior? > > > -- > > > Posted viahttp://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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

