NAME

Eve::PgSqlType::TimestampWithTimeZone - a PostgreSQL timestamp with timezone type.

SYNOPSIS

my $bigint = Eve::PgSqlType::TimestampWithTimeZone->new();
$bigint->serialize(value => $datetime);

DESCRIPTION

Eve::PgSqlType::TimestampWithTimeZone is a PostgreSQL timestamp with time zone type adapter class.

METHODS

get_type()

Returns

The PG_TIMESTAMPTZ type.

wrap()

Wraps an expression with CAST statement.

Arguments

expression

Returns

CAST (expression AS timestamp with time zone)

serialize()

Formats a DateTime object into the appropriate string timestamp with timezone representation with the DateTime::Format::Pg module.

Arguments

value

Returns

The string like '2011-03-21 20:41:34.123456+03'.

deserialize()

Parces a timestamp with time zone string representation into the appropriate DateTime object with the DateTime::Format::Pg module.

Arguments

value

Returns

A DateTime object.

SEE ALSO

DateTime
DateTime::Format::Pg
DBD::Pg
Eve::PgSqlType

LICENSE AND COPYRIGHT

Copyright 2012 Igor Zinovyev.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

AUTHOR

Sergey Konoplev