mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 17:06:33 +03:00
Added other info about tz module.
This commit is contained in:
parent
6a4ff65b49
commit
3789f8fb17
|
@ -482,3 +482,12 @@ The ``cursor`` class
|
|||
|
||||
.. versionadded:: 2.0.6
|
||||
|
||||
|
||||
.. attribute:: tzinfo_factory
|
||||
|
||||
The time zone factory used to handle data types such as
|
||||
:sql:`TIMESTAMP WITH TIME ZONE`. It should be a |tzinfo|_ object.
|
||||
See also the :mod:`psycopg2.tz` module.
|
||||
|
||||
.. |tzinfo| replace:: :class:`!tzinfo`
|
||||
.. _tzinfo: http://docs.python.org/library/datetime.html#tzinfo-objects
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
.. module:: psycopg2.tz
|
||||
|
||||
This module holds two different tzinfo implementations that can be used as the
|
||||
:obj:`tzinfo` argument to datetime constructors, directly passed to psycopg
|
||||
:obj:`tzinfo` argument to datetime constructors, directly passed to Psycopg
|
||||
functions or used to set the :attr:`cursor.tzinfo_factory` attribute in
|
||||
cursors.
|
||||
|
||||
.. todo:: tz module
|
||||
.. todo:: should say something more about tz handling
|
||||
|
||||
.. autoclass:: psycopg2.tz.FixedOffsetTimezone
|
||||
|
||||
|
|
|
@ -34,9 +34,11 @@ ZERO = datetime.timedelta(0)
|
|||
class FixedOffsetTimezone(datetime.tzinfo):
|
||||
"""Fixed offset in minutes east from UTC.
|
||||
|
||||
This is exactly the implementation found in Python 2.3.x documentation,
|
||||
with a small change to the __init__ method to allow for pickling and a
|
||||
default name in the form 'sHH:MM' ('s' is the sign.)
|
||||
This is exactly the implementation__ found in Python 2.3.x documentation,
|
||||
with a small change to the :meth:`!__init__` method to allow for pickling
|
||||
and a default name in the form ``sHH:MM`` (``s`` is the sign.).
|
||||
|
||||
.. __: http://docs.python.org/library/datetime.html#datetime-tzinfo
|
||||
"""
|
||||
_name = None
|
||||
_offset = ZERO
|
||||
|
|
Loading…
Reference in New Issue
Block a user