parse unix date

pull/217/head
Pete Matsyburka 2 years ago
parent 98c79d2dec
commit 48d5bee95b

@ -48,7 +48,11 @@ module Submitters
if field['type'] == 'text' && value.present? if field['type'] == 'text' && value.present?
value.to_s value.to_s
elsif field['type'] == 'date' && value.present? 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 else
value value
end end

Loading…
Cancel
Save