lib/databasedotcom/sobject/sobject.rb in databasedotcom-1.2.4 vs lib/databasedotcom/sobject/sobject.rb in databasedotcom-1.2.5
- old
+ new
@@ -340,10 +340,10 @@
params.inject([]) do |arr, av|
case av[1]
when String
value_str = "'#{av[1].gsub("'", "\\\\'")}'"
when DateTime, Time
- value_str = av[1].strftime("%Y-%m-%dT%H:%M:%S.%L%z").insert(-3, ":")
+ value_str = av[1].strftime(RUBY_VERSION.match(/^1.8/) ? "%Y-%m-%dT%H:%M:%S.000%z" : "%Y-%m-%dT%H:%M:%S.%L%z").insert(-3, ":")
else
value_str = av[1].to_s
end
arr << "#{av[0]} = #{value_str}"