Module: DB::Postgres::Native::Types::DateTime

Defined in:
lib/db/postgres/native/types.rb

Class Method Summary collapse

Class Method Details

.parse(string) ⇒ Object


62
63
64
65
66
67
68
# File 'lib/db/postgres/native/types.rb', line 62

def self.parse(string)
	if string
		parts = string.split(/[\-\s:\.]/)
		
		return Time.utc(*parts)
	end
end