Class: PG::TextDecoder::TimestampWithoutTimeZone

### Home Classes Methods

### In Files

- lib/pg/text_decoder.rb

### Parent

SimpleDecoder

### Methods

- #decode

### Files

- LICENSE
- Manifest.txt
- POSTGRES
- README-OS_X.rdoc
- README-Windows.rdoc
- README.ja.rdoc
- README.rdoc
- errorcodes.txt

### Class/Module Index

Quicksearch

- PG
- PG::BasicTypeMapBasedOnResult
- PG::BasicTypeMapForQueries
- PG::BasicTypeMapForResults
- PG::BasicTypeMapForResults::WarningTypeMap
- PG::BasicTypeRegistry
- PG::BasicTypeRegistry::CoderMap
- PG::Coder
- PG::Coder::BinaryFormatting
- PG::CompositeCoder
- PG::Connection
- PG::Connection
- PG::Constants
- PG::CopyCoder
- PG::Error
- PG::NotAllCopyDataRetrieved
- PG::Result
- PG::Result
- PG::TextDecoder
- PG::TextDecoder::Date
- PG::TextDecoder::TimestampWithTimeZone
- PG::TextDecoder::TimestampWithoutTimeZone
- PG::TextEncoder
- PG::TextEncoder::Date
- PG::TextEncoder::TimestampWithTimeZone
- PG::TextEncoder::TimestampWithoutTimeZone
- PG::TypeMapByColumn
- Object
- Object::PGconn
- Object::PGresult

No matching classes.

# PG::TextDecoder::TimestampWithoutTimeZone

### Constants

ISO_DATETIME_WITHOUT_TIMEZONE

### Public Instance Methods

decode(string, tuple=nil, field=nil) click to toggle source

    # File lib/pg/text_decoder.rb, line 20
    def decode(string, tuple=nil, field=nil)
            if string =~ ISO_DATETIME_WITHOUT_TIMEZONE
                    Time.new $1.to_i, $2.to_i, $3.to_i, $4.to_i, $5.to_i, "#{$6}#{$7}".to_r
            else
                    string
            end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.