mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 22:42:32 -05:00
parse unix date
This commit is contained in:
1 parent
98c79d2dec
commit
48d5bee95b
1 file changed
+5
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user