Commit 328b19c429c60d68585fba4507c7082b57bc9808
1 parent
aa255399
Exists in
master
and in
29 other branches
Changes date format in csv
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
plugins/custom_forms/controllers/custom_forms_plugin_myprofile_controller.rb
@@ -73,7 +73,7 @@ class CustomFormsPluginMyprofileController < MyProfileController | @@ -73,7 +73,7 @@ class CustomFormsPluginMyprofileController < MyProfileController | ||
73 | columns = @form.fields.count + 3 | 73 | columns = @form.fields.count + 3 |
74 | csv_content = CSV.generate_line(['Timestamp', 'Name', 'Email'] + @form.fields.map(&:name)) + "\n" | 74 | csv_content = CSV.generate_line(['Timestamp', 'Name', 'Email'] + @form.fields.map(&:name)) + "\n" |
75 | @submissions.each do |s| | 75 | @submissions.each do |s| |
76 | - fields = [s.updated_at, s.profile.present? ? s.profile.name : s.author_name, s.profile.present? ? s.profile.email : s.author_email] | 76 | + fields = [s.updated_at.strftime('%Y/%m/%d %T %Z'), s.profile.present? ? s.profile.name : s.author_name, s.profile.present? ? s.profile.email : s.author_email] |
77 | @form.fields.each do |f| | 77 | @form.fields.each do |f| |
78 | fields << s.answers.select{|a| a.field == f}.map{|answer| answer.to_s} | 78 | fields << s.answers.select{|a| a.field == f}.map{|answer| answer.to_s} |
79 | end | 79 | end |