简体   繁体   中英

I18n.l displays wrong month (one month later)

I have a strage issue with the I18n.l helper. I've got the following date in a updated_at database field: 2013-04-09 08:17:26

i display this date in my view with <%= l product.updated_at %> and get this the first time i load the page: Dienstag, 09. April 2013, 10:17 Uhr . When i refresh the page it becomes Dienstag, 09. Mai 2013, 10:17 Uhr . As you can see the date is now one moth later. It sticks to that until i restart the server. Then once again it displays correctly one time.

What could be the issue here?

I finally found it. It was a bug in the Spree version I was using, they were deleting the nil key from the month_names accidentally: https://github.com/spree/spree/pull/2427

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM