Class: PG::TextEncoder::TimestampWithoutTimeZone

Inherits:
SimpleEncoder
  • Object
show all
Defined in:
lib/pg/text_encoder.rb

Instance Method Summary collapse

Instance Method Details

#encode(value) ⇒ Object



16
17
18
# File 'lib/pg/text_encoder.rb', line 16

def encode(value)
  value.respond_to?(:strftime) ? value.strftime("%Y-%m-%d %H:%M:%S.%N") : value
end