lib/gorillib/datetime/parse.rb in gorillib-0.4.1pre vs lib/gorillib/datetime/parse.rb in gorillib-0.4.2pre
- old
+ new
@@ -14,10 +14,12 @@
case
when dt.is_a?(Time) then dt.utc
when (dt.to_s =~ /\A\d{14}\z/) then parse(dt.to_s+'Z', true)
else parse(dt.to_s, true).utc
end
- rescue StandardError => e
- Log.debug e
+ rescue StandardError => err
+ Log.debug "Can't parse a #{self} from #{dt.inspect}"
+ Log.debug err
+ return nil
end
end unless method_defined?(:parse_safely)
end