parse unix date

This commit is contained in:
Pete Matsyburka
2024-02-09 15:03:20 +02:00
parent 98c79d2dec
commit 48d5bee95b
+5 -1
View File
@@ -48,7 +48,11 @@ module Submitters
if field['type'] == 'text' && value.present?
value.to_s
elsif field['type'] == 'date' && value.present?
Date.parse(value).to_s
if value.is_a?(Integer)
Time.zone.at(value.to_s.first(10).to_i).to_date
else
Date.parse(value).to_s
end
else
value
end