diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-08-14 15:52:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-08-14 15:52:04 +0000 |
commit | 67ea285dea5185fa11b351a3fa8507c6fb92e030 (patch) | |
tree | 9f7c041b4fee22c4e5ad9c8d9e1a399bdfcb5c2a /app/models/import.rb | |
parent | 722eaed7216270d8e89f50c92abb1cfaf9bf1503 (diff) | |
download | redmine-67ea285dea5185fa11b351a3fa8507c6fb92e030.tar.gz redmine-67ea285dea5185fa11b351a3fa8507c6fb92e030.zip |
Set default date format based on user locale (#950).
git-svn-id: http://svn.redmine.org/redmine/trunk@14496 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/import.rb')
-rw-r--r-- | app/models/import.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/import.rb b/app/models/import.rb index df29d1788..589967428 100644 --- a/app/models/import.rb +++ b/app/models/import.rb @@ -59,10 +59,14 @@ class Import < ActiveRecord::Base wrapper = '"' encoding = lu(user, :general_csv_encoding) + date_format = lu(user, "date.formats.default", :default => "foo") + date_format = DATE_FORMATS.first unless DATE_FORMATS.include?(date_format) + self.settings.merge!( 'separator' => separator, 'wrapper' => wrapper, - 'encoding' => encoding + 'encoding' => encoding, + 'date_format' => date_format ) end |