Sha256: c119d836afb22367714b764bdae20d193fbdb6b542ad808629a612e0877720d8
Contents?: true
Size: 582 Bytes
Versions: 44
Compression:
Stored size: 582 Bytes
Contents
# -*- ruby -*- # frozen_string_literal: true module PG 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
44 entries across 44 versions & 1 rubygems