# I18n.l date displays the month wrong by +one

**URL:** <https://www.ruby-forum.com/t/i18n-l-date-displays-the-month-wrong-by-one/225560>\
**Category:** Rails I18n\
**Created:** [January 15, 2013, 11:50am UTC](https://www.ruby-forum.com/t/i18n-l-date-displays-the-month-wrong-by-one/225560 "2013-01-15T11:50:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [January 15, 2013, 11:50am UTC](https://www.ruby-forum.com/t/i18n-l-date-displays-the-month-wrong-by-one/225560/1 "2013-01-15T11:50:00Z")

</div>

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  
in  
finding it. Ie what kind of calls can be done to make this behavior  
happen,  
or could it be some locale file anyway that only gets loaded after the  
page  
shows.

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  
the  
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

Torsten
