Sha256: 11d8846fdf987951e5612907bb202b103509eddf5bb5b8c1d04bc6e68ea708eb
Contents?: true
Size: 592 Bytes
Versions: 3
Compression:
Stored size: 592 Bytes
Contents
# -*- ruby -*- # frozen_string_literal: true module YugabyteYSQL module TextEncoder class TimestampWithoutTimeZone < SimpleEncoder def encode(value) value.respond_to?(:strftime) ? value.strftime("%Y-%m-%d %H:%M:%S.%N") : value end end class TimestampUtc < SimpleEncoder def encode(value) value.respond_to?(:utc) ? value.utc.strftime("%Y-%m-%d %H:%M:%S.%N") : value end end class TimestampWithTimeZone < SimpleEncoder def encode(value) value.respond_to?(:strftime) ? value.strftime("%Y-%m-%d %H:%M:%S.%N %:z") : value end end end end # module PG
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
yugabyte_ysql-0.3 | lib/pg/text_encoder/timestamp.rb |
yugabyte_ysql-0.2 | lib/pg/text_encoder/timestamp.rb |
yugabyte_ysql-0.1 | lib/pg/text_encoder/timestamp.rb |