Your IP : 216.73.216.213
�!X�- � @ s d d l m Z d d l m Z d d l m Z m Z m Z d d l Z e d � Z d d g Z d d � Z
e e d � r� d d
d � Z n% Gd d � d e � Z
d d
d � Z Gd d � d e � Z Gd d � d e � Z d d � Z e e d e � Z d S)� )�PY3)�_thread)�datetime� timedelta�tzinfoN�tzname_in_python2�enfoldc s � f d d � } | S)z�Change unicode output into bytestrings in Python 2
tzname() API changed in Python 3. It used to return bytes, but was changed
to unicode strings
c s2 � | | � } | d k r. t r. | j � } | S)N)r �encode)�args�kwargs�name)�namefunc� �D/opt/alt/python35/lib/python3.5/site-packages/dateutil/tz/_common.py�adjust_encoding s z*tzname_in_python2.<locals>.adjust_encodingr )r
r r )r
r r s �fold� c C s | j d | � S)a�
Provides a unified interface for assigning the ``fold`` attribute to
datetimes both before and after the implementation of PEP-495.
:param fold:
The value for the ``fold`` attribute in the returned datetime. This
should be either 0 or 1.
:return:
Returns an object for which ``getattr(dt, 'fold', 0)`` returns
``fold`` for all versions of Python. In versions prior to
Python 3.6, this is a ``_DatetimeWithFold`` object, which is a
subclass of :py:class:`datetime.datetime` with the ``fold``
attribute added, if ``fold`` is 1.
..versionadded:: 2.6.0
r )�replace)�dtr r r r r s c @ s. e Z d Z d Z f Z e d d � � Z d S)�_DatetimeWithFoldz�
This is a class designed to provide a PEP 495-compliant interface for
Python versions before 3.6. It is used only for dates in a fold, so
the ``fold`` attribute is fixed at ``1``.
..versionadded:: 2.6.0
c C s d S)Nr r )�selfr r r r ? s z_DatetimeWithFold.foldN)�__name__�
__module__�__qualname__�__doc__� __slots__�propertyr r r r r r 5 s r c C sf t | d d � | k r | S| j � d d � } | | j | j f 7} | rX t | � St | � Sd S)a�
Provides a unified interface for assigning the ``fold`` attribute to
datetimes both before and after the implementation of PEP-495.
:param fold:
The value for the ``fold`` attribute in the returned datetime. This
should be either 0 or 1.
:return:
Returns an object for which ``getattr(dt, 'fold', 0)`` returns
``fold`` for all versions of Python. In versions prior to
Python 3.6, this is a ``_DatetimeWithFold`` object, which is a
subclass of :py:class:`datetime.datetime` with the ``fold``
attribute added, if ``fold`` is 1.
..versionadded:: 2.6.0
r r N� )�getattrZ timetupleZmicrosecondr r r )r r r
r r r r C s
c @ sR e Z d Z d Z d d � Z d d � Z d d � Z d d � Z d
d � Z d S)
�_tzinfoz=
Base class for all ``dateutil`` ``tzinfo`` objects.
c C s} | j d | � } t | d d �} t | d d �} | j � | j � k } | j d d � | j d d � k } | o| | S)a5
Whether or not the "wall time" of a given datetime is ambiguous in this
zone.
:param dt:
A :py:class:`datetime.datetime`, naive or time zone aware.
:return:
Returns ``True`` if ambiguous, ``False`` otherwise.
..versionadded:: 2.6.0
r r r r N)r r � utcoffset)r r Zwall_0Zwall_1Zsame_offsetZsame_dtr r r �is_ambiguousf s $z_tzinfo.is_ambiguousc C sH | j | � r>