lib/updateagent/updateagent.rb in onebody-updateagent-0.5.3 vs lib/updateagent/updateagent.rb in onebody-updateagent-0.5.4
- old
+ new
@@ -47,9 +47,10 @@
if value.blank?
value = nil
else
begin
value = DateTime.parse(value)
+ value = DateTime.parse(value.strftime('1900-%m-%d %H:%M')) if value.year == 0
rescue ArgumentError
puts "Invalid date in #{filename} record #{index} (#{key}) - #{value}"
exit(1)
end
end