diff --git a/app/services/commentaire_service.rb b/app/services/commentaire_service.rb index fa3a81764..7ea4233c8 100644 --- a/app/services/commentaire_service.rb +++ b/app/services/commentaire_service.rb @@ -28,7 +28,7 @@ class CommentaireService if commentaire.sent_by?(user) commentaire.piece_jointe.purge_later if commentaire.piece_jointe.attached? commentaire.update!(body: I18n.t('views.shared.commentaires.destroy.deleted_body'), - deleted_at: Time.zone.now.utc) + deleted_at: Time.zone.now) OpenStruct.new(status: true) else OpenStruct.new(status: false, diff --git a/spec/services/commentaire_service_spec.rb b/spec/services/commentaire_service_spec.rb index 30f4373ef..2864250e2 100644 --- a/spec/services/commentaire_service_spec.rb +++ b/spec/services/commentaire_service_spec.rb @@ -104,7 +104,7 @@ describe CommentaireService do end it 'set deleted_at' do Timecop.freeze do - expect { subject }.to change { commentaire.reload.deleted_at }.from(nil).to(Time.zone.now.utc) + expect { subject }.to change { commentaire.reload.deleted_at }.from(nil).to(Time.zone.now) end end end