Class: PG::TextEncoder::TimestampWithTimeZone

Inherits:
SimpleEncoder
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pg-1.4.5/lib/pg/text_encoder.rb

Instance Method Summary collapse

Instance Method Details

#encode(value) ⇒ Object



28
29
30
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/pg-1.4.5/lib/pg/text_encoder.rb', line 28

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