diff --git a/app/decorators/dossier_decorator.rb b/app/decorators/dossier_decorator.rb index e42ba1496..c4ce6b8e7 100644 --- a/app/decorators/dossier_decorator.rb +++ b/app/decorators/dossier_decorator.rb @@ -5,11 +5,11 @@ class DossierDecorator < Draper::Decorator delegate_all def first_creation - created_at.localtime.strftime('%d/%m/%Y %H:%M') + created_at.strftime('%d/%m/%Y %H:%M') end def last_update - updated_at.localtime.strftime('%d/%m/%Y %H:%M') + updated_at.strftime('%d/%m/%Y %H:%M') end def display_state diff --git a/app/decorators/procedure_decorator.rb b/app/decorators/procedure_decorator.rb index 6b1fc43c3..e4933fbea 100644 --- a/app/decorators/procedure_decorator.rb +++ b/app/decorators/procedure_decorator.rb @@ -2,12 +2,12 @@ class ProcedureDecorator < Draper::Decorator delegate_all def created_at_fr - created_at.localtime.strftime('%d/%m/%Y %H:%M') + created_at.strftime('%d/%m/%Y %H:%M') end def published_at_fr if published_at.present? - published_at.localtime.strftime('%d/%m/%Y %H:%M') + published_at.strftime('%d/%m/%Y %H:%M') end end diff --git a/app/helpers/commentaire_helper.rb b/app/helpers/commentaire_helper.rb index f42450024..684ff2356 100644 --- a/app/helpers/commentaire_helper.rb +++ b/app/helpers/commentaire_helper.rb @@ -20,7 +20,7 @@ module CommentaireHelper def commentaire_date(commentaire) is_current_year = (commentaire.created_at.year == Date.current.year) template = is_current_year ? :message_date : :message_date_with_year - I18n.l(commentaire.created_at.localtime, format: template) + I18n.l(commentaire.created_at, format: template) end private diff --git a/app/models/commentaire.rb b/app/models/commentaire.rb index e3b3d2c72..8b510b095 100644 --- a/app/models/commentaire.rb +++ b/app/models/commentaire.rb @@ -14,7 +14,7 @@ class Commentaire < ApplicationRecord after_create :notify def header - "#{sender}, #{I18n.l(created_at.localtime, format: '%d %b %Y %H:%M')}" + "#{sender}, #{I18n.l(created_at, format: '%d %b %Y %H:%M')}" end def sender diff --git a/app/models/concerns/tags_substitution_concern.rb b/app/models/concerns/tags_substitution_concern.rb index b861fd026..c57ac92ef 100644 --- a/app/models/concerns/tags_substitution_concern.rb +++ b/app/models/concerns/tags_substitution_concern.rb @@ -126,7 +126,7 @@ module TagsSubstitutionConcern def format_date(date) if date.present? - date.localtime.strftime('%d/%m/%Y') + date.strftime('%d/%m/%Y') else '' end diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 7057665b3..fdcf4336c 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -194,7 +194,7 @@ class Dossier < ApplicationRecord else parts = [ "Dossier déposé le ", - en_construction_at.localtime.strftime("%d/%m/%Y"), + en_construction_at.strftime("%d/%m/%Y"), " sur la démarche ", procedure.libelle, " gérée par l'organisme ", diff --git a/app/views/new_gestionnaire/avis/instruction.html.haml b/app/views/new_gestionnaire/avis/instruction.html.haml index 5bef952d5..35e545155 100644 --- a/app/views/new_gestionnaire/avis/instruction.html.haml +++ b/app/views/new_gestionnaire/avis/instruction.html.haml @@ -8,7 +8,7 @@ %h2.claimant Demandeur : %span.email= @avis.claimant.email - %span.date Demande d'avis envoyée le #{I18n.l(@avis.created_at.localtime, format: '%d/%m/%y')} + %span.date Demande d'avis envoyée le #{I18n.l(@avis.created_at, format: '%d/%m/%y')} %p.introduction= @avis.introduction = form_for @avis, url: gestionnaire_avis_path(@avis), html: { class: 'form' } do |f| diff --git a/app/views/new_gestionnaire/shared/avis/_list.html.haml b/app/views/new_gestionnaire/shared/avis/_list.html.haml index fb34568fb..8bbc4654d 100644 --- a/app/views/new_gestionnaire/shared/avis/_list.html.haml +++ b/app/views/new_gestionnaire/shared/avis/_list.html.haml @@ -15,7 +15,7 @@ confidentiel %span.icon.lock{ title: "Cet avis n'est pas affiché avec les autres experts consultés" } %span.date{ class: highlight_if_unseen_class(avis_seen_at, avis.created_at) } - Demande d'avis envoyée le #{I18n.l(avis.created_at.localtime, format: '%d/%m/%y à %H:%M')} + Demande d'avis envoyée le #{I18n.l(avis.created_at, format: '%d/%m/%y à %H:%M')} %p= avis.introduction .answer.flex.align-start @@ -25,7 +25,7 @@ = (avis.email_to_display == current_gestionnaire.email) ? 'Vous' : avis.email_to_display - if avis.answer.present? %span.date{ class: highlight_if_unseen_class(avis_seen_at, avis.updated_at) } - Réponse donnée le #{I18n.l(avis.updated_at.localtime, format: '%d/%m/%y à %H:%M')} + Réponse donnée le #{I18n.l(avis.updated_at, format: '%d/%m/%y à %H:%M')} - else %span.waiting En attente de réponse %p= avis.answer diff --git a/app/views/new_user/dossiers/index.html.haml b/app/views/new_user/dossiers/index.html.haml index 1f9be4d28..80f6a9aff 100644 --- a/app/views/new_user/dossiers/index.html.haml +++ b/app/views/new_user/dossiers/index.html.haml @@ -48,7 +48,7 @@ = render partial: 'shared/dossiers/status_badge', locals: { dossier: dossier } %td.updated-at-col = link_to(url_for_dossier(dossier), class: 'cell-link') do - = dossier.updated_at.localtime.strftime("%d/%m/%Y") + = dossier.updated_at.strftime("%d/%m/%Y") = paginate(@dossiers) - if current_user.feedbacks.empty? || current_user.feedbacks.last.created_at < 1.month.ago diff --git a/app/views/shared/dossiers/_champs.html.haml b/app/views/shared/dossiers/_champs.html.haml index cf69342c6..b7feb25a9 100644 --- a/app/views/shared/dossiers/_champs.html.haml +++ b/app/views/shared/dossiers/_champs.html.haml @@ -73,4 +73,4 @@ %td.updated-at %span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) } modifié le - = c.updated_at.localtime.strftime("%d/%m/%Y à %H:%M") + = c.updated_at.strftime("%d/%m/%Y à %H:%M") diff --git a/app/views/shared/dossiers/_pieces_jointes.html.haml b/app/views/shared/dossiers/_pieces_jointes.html.haml index 78dafa823..ec9218d2e 100644 --- a/app/views/shared/dossiers/_pieces_jointes.html.haml +++ b/app/views/shared/dossiers/_pieces_jointes.html.haml @@ -23,11 +23,11 @@ = link_to pj.content_url, { target: :blank } do %span.filename= display_pj_filename(pj) %span - ajoutée le #{pj.created_at.localtime.strftime('%d/%m/%Y à %H:%M')} + ajoutée le #{pj.created_at.strftime('%d/%m/%Y à %H:%M')} - else %td Pièce non fournie %td.updated-at - if pj %span{ class: highlight_if_unseen_class(demande_seen_at, pj.updated_at) } modifié le - = pj.updated_at.localtime.strftime("%d/%m/%Y à %H:%M") + = pj.updated_at.strftime("%d/%m/%Y à %H:%M")