0

Edit: (to be clear and to the point)

I want the following to work on heroku: "11/13/2011".to_datetime, meaning I need the dates to be in english format. Thanks


I've set this the i18n locale in my application.rb

config.i18n.default_locale = :en
config.i18n.locale = :en

In the heroku console:

I18n.locale
=> :en

So it seems like it's set correctly.

But when I do:

"11/13/2011".to_datetime
=> ArgumentError: invalid date

Noooo!

Do you have any idea of what I'm doing wrong here?

Thanks.

Robin
  • 21,667
  • 10
  • 62
  • 85

1 Answers1

0

The i18n config had nothing to do with my problem. Just a ruby version "problem".

I was working with ruby 1.8.7 in my local env, and heroku was at 1.9.x.

Rails 1.9 assumes EU format, 1.8.7 does not.

Robin
  • 21,667
  • 10
  • 62
  • 85