module PG::TextDecoder - pg-1.1.4 Documentation

# module PG::TextDecoder

This module encapsulates all decoder classes with text input format

### Constants

TimestampWithTimeZone

  This is a decoder class for conversion of PostgreSQL text timestamps to Ruby Time objects.

  The following flags can be used to specify timezone interpretation:

  - `PG::Coder::TIMESTAMP_DB_UTC` : Interpret timestamp as UTC time (default)

  - `PG::Coder::TIMESTAMP_DB_LOCAL` : Interpret timestamp as local time

  - `PG::Coder::TIMESTAMP_APP_UTC` : Return timestamp as UTC time (default)

  - `PG::Coder::TIMESTAMP_APP_LOCAL` : Return timestamp as local time

  Example:

      deco = PG::TextDecoder::Timestamp.new(flags: PG::Coder::TIMESTAMP_DB_UTC | PG::Coder::TIMESTAMP_APP_LOCAL)
      deco.decode("2000-01-01 00:00:00")  # => 2000-01-01 01:00:00 +0100

TimestampWithoutTimeZone

  For backward compatibility: