Treatment of time in recent versions of crystal-db/crystal-pg; a bug?

@curious2learn you can paste that code in your application anywhere after require "pg". And check if that works.

From @asterite changes it’s probably the following patch the right fix.

struct PQ::Param
  def self.encode(val : Time)
    text val.to_s("%FT%X.%6N%z")
  end
end

[edit: without the to_utc]