DateTime.parse => Time.zone.parse

This commit is contained in:
simon lehericey 2018-10-25 15:17:33 +02:00
parent 2238e5bd9f
commit f620e4aee2
11 changed files with 19 additions and 19 deletions

View file

@ -24,7 +24,7 @@ class ChampDecorator < Draper::Decorator
if type_champ == TypeDeChamp.type_champs.fetch(:date)
object.value
elsif type_champ == TypeDeChamp.type_champs.fetch(:datetime) && object.value != ' 00:00'
DateTime.parse(object.value, "%Y-%m-%d %H:%M").strftime("%Y-%m-%d")
Time.zone.parse(object.value, "%Y-%m-%d %H:%M").strftime("%Y-%m-%d")
end
end
end