From 6bccb05c90c964374e9b2b0e55c281f3cf7bc4a9 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Thu, 25 Dec 2014 14:57:31 +0100 Subject: [PATCH] timetz adaptation documented --- NEWS | 5 +++++ doc/src/usage.rst | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 1db0ad80..c8ff325c 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,11 @@ Current release What's new in psycopg 2.6 ------------------------- +New features: + +- Python `time` objects with a tzinfo specified and PostgreSQL :sql:`timetz` + data are converted into each other (ticket #272). + Bug fixes: - Json apapter's `!str()` returns the adapted content instead of the `!repr()` diff --git a/doc/src/usage.rst b/doc/src/usage.rst index b87887d1..7ffa3baa 100644 --- a/doc/src/usage.rst +++ b/doc/src/usage.rst @@ -245,7 +245,8 @@ types: +--------------------+-------------------------+--------------------------+ | `!date` | :sql:`date` | :ref:`adapt-date` | +--------------------+-------------------------+ | - | `!time` | :sql:`time` | | + | `!time` | | :sql:`time` | | + | | | :sql:`timetz` | | +--------------------+-------------------------+ | | `!datetime` | | :sql:`timestamp` | | | | | :sql:`timestamptz` | | @@ -482,7 +483,7 @@ Date/Time objects adaptation Python builtin `~datetime.datetime`, `~datetime.date`, `~datetime.time`, `~datetime.timedelta` are converted into PostgreSQL's -:sql:`timestamp[tz]`, :sql:`date`, :sql:`time`, :sql:`interval` data types. +:sql:`timestamp[tz]`, :sql:`date`, :sql:`time[tz]`, :sql:`interval` data types. Time zones are supported too. The Egenix `mx.DateTime`_ objects are adapted the same way::