remove localtime as it uses server timezone
This commit is contained in:
parent
9475795143
commit
3dad743d56
11 changed files with 15 additions and 15 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ",
|
||||
|
|
|
@ -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|
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue