Forum: Rails I18n I18n.l date displays the month wrong by +one

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
"Torsten Rüger" <> (Guest)
on 2013-01-15 11:50
(Received via mailing list)
I have an object with a created_at date and if i just display
(to_date.to_s) that in a template, it displays correctly as "2013-01-09"

But, if i use i18n as in <%= I18n.l object.created_at.to_date %>  it
displays as 9. helmikuuta 2013  (february)
(that's finish locale, but i just checked i have the latest)

What is even more interesting is that this behavior only occurs after a
page refresh and hence after. The first time a page shows it is correct
And in the console it is always correct.

I am quite sure this is not a i18n bug, but i would appreciate any help
finding it. Ie what kind of calls can be done to make this behavior
or could it be some locale file anyway that only gets loaded after the

Actually i just noticed by accident that touching the rails locale file
will make it show the correct date once again in development. I guess
fi.yml gets reloaded but then overwritten again. How oh how.

The template code has not changed and it did work fine with rails 3.2.9,
before upgrading rails to 3.2.11 .

much obliged

This topic is locked and can not be replied to.