Defect #19039

Mail notification is formatting dates with changer's locale

Added by Rafael Vargas over 7 years ago. Updated over 7 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:


Target version:3.0.0
Resolution:Fixed Affected version:2.6.0


Our installation default language is PT-BR but some users have EN configured as user language for their personal accounts.

The date formats are: pt-BR: "DD/MM/YYYY" and en: "MM/DD/YYYY"

When someone makes a change in the dates (start date/due date) using Redmine in EN, the email notifications for those users using PT-BR come almost completely localized with the exception of the dates that are coming in the changers locale format.

This can lead to problems with dates like 10/mar/2015 which will be formatted as 10/03/2015 for PT-BR and 03/10/2015 for EN.

The dates seem to be correctly saved in the database as opening the issue in the browser shows the dates correctly localized.

My environment is as follows:

  Redmine version                2.6.0.stable
  Ruby version                   2.1.1-p76 (2014-02-24) [x86_64-linux]
  Rails version                  3.2.19
  Environment                    production
  Database adapter               Mysql2
  Subversion                     1.8.10
  Mercurial                      1.3.1
  Cvs                            1.12.13
  Git                            1.8.0
Redmine plugins:
  redmine_better_gantt_chart     0.9.0

Associated revisions

Revision 13978
Added by Jean-Philippe Lang over 7 years ago

Don't use current user locale to format dates (#19039).


#1 Updated by Jean-Philippe Lang over 7 years ago

When sending email notifications, Redmine uses the default locale defined in application settings (Settings / Display / Default language). Which one is yours, EN or PT-BR?

#2 Updated by Rafael Vargas over 7 years ago

My default language is is set to PT-BR, and I'm not forcing the default language anywhere.

But these are the date and time settings:

Start calendars on:  Based on user's language
Date format: Based on user's language
Time format: Based on user's language

#3 Updated by Jean-Philippe Lang over 7 years ago

  • Target version set to 3.0.0

#4 Updated by Jean-Philippe Lang over 7 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

This is fixed in r13978, thanks for pointing this out.

#5 Updated by Rafael Vargas over 7 years ago

Thanks for the quick fix and for the great software!

As a note, shouldn't the notification emails be localized according to the user receiving those emails?

Also available in: Atom PDF