Current File : //usr/lib/python3/dist-packages/dateutil/tz/__pycache__/tz.cpython-312.pyc
�

Lf������dZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
Z
ddl
mZddlm
Z
ddlmZmZddlmZmZdd	lmZdd
lmZmZddlmZ	ddlmZmZdd
lmZej<d�Zejddddd�Z e jC�Z"e
jFe�Gd�dejH��Z%e%�Z&e
jFe�Gd�dejH��Z'Gd�de�Z(Gd�de)�Z*Gd�de)�Z+Gd�de�Z,Gd�de�Z-e
jFe�Gd�de-��Z.Gd�d e)�Z/Gd!�d"e�Z0Gd#�d$e)�Z1ejdd%k7r	d&d'gZ3gd(�Z4ngZ3gZ4d)�Z5e5�Z6[5d4d*�Z7d4d+�Z8d,�Z9d-�Z:ejvd.k\rd/�Z<nd0�Z<	dd1l=m>Z?y#e$rdxZZY��pwxYw#e$rGd2�d3e)�Z?YywxYw)5a�
This module offers timezone implementations subclassing the abstract
:py:class:`datetime.tzinfo` type. There are classes to handle tzfile format
files (usually are in :file:`/etc/localtime`, :file:`/usr/share/zoneinfo`,
etc), TZ environment string (in all known formats), given ranges (with help
from relative deltas), local machine timezone, fixed offset timezone, and UTC
timezone.
�N)�OrderedDict)�string_types)�_thread�)�tzname_in_python2�_tzinfo)�tzrangebase�enfold)�_validate_fromutc_inputs)�_TzSingleton�_TzOffsetFactory)�
_TzStrFactory)�tzwin�
tzwinlocal)�warni�c�p�eZdZdZd�Zd�Zed��Zd�Ze	d��Z
d�ZdZd	�Z
d
�Zej Zy)�tzutca�
    This is a tzinfo object that represents the UTC time zone.

    **Examples:**

    .. doctest::

        >>> from datetime import *
        >>> from dateutil.tz import *

        >>> datetime.now()
        datetime.datetime(2003, 9, 27, 9, 40, 1, 521290)

        >>> datetime.now(tzutc())
        datetime.datetime(2003, 9, 27, 12, 40, 12, 156379, tzinfo=tzutc())

        >>> datetime.now(tzutc()).tzname()
        'UTC'

    .. versionchanged:: 2.7.0
        ``tzutc()`` is now a singleton, so the result of ``tzutc()`` will
        always return the same object.

        .. doctest::

            >>> from dateutil.tz import tzutc, UTC
            >>> tzutc() is tzutc()
            True
            >>> tzutc() is UTC
            True
    c��tS�N��ZERO��self�dts  �0/usr/lib/python3/dist-packages/dateutil/tz/tz.py�	utcoffsetztzutc.utcoffsetJ�����c��tSrrrs  r�dstz	tzutc.dstMrrc��y)N�UTC�rs  r�tznameztzutc.tznamePs��rc��y)�6
        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
        Fr#rs  r�is_ambiguousztzutc.is_ambiguousTs��rc��|S)z�
        Fast track version of fromutc() returns the original ``dt`` object for
        any valid :py:class:`datetime.datetime` object.
        r#rs  r�fromutcz
tzutc.fromutcds	���	rc��t|ttf�stSt|t�xs%t|t�xr|jt
k(Sr)�
isinstancer�tzoffset�NotImplemented�_offsetr�r�others  r�__eq__ztzutc.__eq__lsE���%�%��!2�3�!�!��5�%�(�H��E�8�,�F����$�1F�	IrNc��||k(Srr#r/s  r�__ne__ztzutc.__ne__u����E�M�"�"rc�4�d|jjzS�Nz%s()��	__class__�__name__�rs r�__repr__ztzutc.__repr__x�������/�/�/�/r)r9�
__module__�__qualname__�__doc__rr rr$r'rr)r1�__hash__r3r;�object�
__reduce__r#rrrr)sb���>������� ����I��H�#�0��"�"�Jrrc�v�eZdZdZd�Zd�Zd�Zed��Ze	d��Z
d�Zd�Zd	Z
d
�Zd�Zej"Zy	)r,a1
    A simple class for representing a fixed offset from UTC.

    :param name:
        The timezone name, to be returned when ``tzname()`` is called.
    :param offset:
        The time zone offset in seconds, or (since version 2.6.0, represented
        as a :py:class:`datetime.timedelta` object).
    c��||_	|j�}t	j
t
|���|_y#ttf$rY�6wxYw�N��seconds)�_name�
total_seconds�	TypeError�AttributeError�datetime�	timedelta�_get_supported_offsetr.)r�name�offsets   r�__init__ztzoffset.__init__�sO����
�	��)�)�+�F� �)�)�2G��2O�P�����>�*�	��	�s�>�A�Ac��|jSr�r.rs  rrztzoffset.utcoffset�s���|�|�rc��tSrrrs  rr ztzoffset.dst�rrc��|jSr)rHrs  rr$ztzoffset.tzname�s���z�z�rc� �||jzSrrSrs  rr)ztzoffset.fromutc�s���D�L�L� � rc��y)a4
        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
        Fr#rs  rr'ztzoffset.is_ambiguous�s��rc�`�t|t�stS|j|jk(Sr)r+r,r-r.r/s  rr1ztzoffset.__eq__�s%���%��*�!�!��|�|�u�}�}�,�,rNc��||k(Srr#r/s  rr3ztzoffset.__ne__�r4rc��|jj�dt|j��dt	|j
j
���d�S)N�(�, �))r8r9�reprrH�intr.rIr:s rr;ztzoffset.__repr__�s<��#�~�~�6�6�#�D�J�J�/�"�4�<�<�#=�#=�#?�@�B�	Br)r9r=r>r?rQrr rr$rr)r'r1r@r3r;rArBr#rrr,r,�sh���	Q��������!��!��-��H�#�B�
�"�"�Jrr,c���eZdZdZ�fd�Zd�Zd�Zed��Zd�Z	d�Z
d
d�Zd	�Zd
Z
d�Zd�Zej"Z�xZS)�tzlocalzR
    A :class:`tzinfo` subclass built around the ``time`` timezone functions.
    c����tt|��tjt
j��|_t
jr+tjt
j��|_
n|j|_
|j|jz
|_t|j�|_
tt
j�|_yrE)�superrarQrLrM�time�timezone�_std_offset�daylight�altzone�_dst_offset�
_dst_saved�bool�_hasdst�tupler$�_tznames)rr8s �rrQztzlocal.__init__�s����
�g�t�%�'�#�-�-�t�}�}�n�E����=�=�'�1�1�4�<�<�-�H�D��#�/�/�D���*�*�T�-=�-=�=����D�O�O�,����d�k�k�*��
rc�r�|�
|jry|j|�r|jS|jSr)rl�_isdstrirfrs  rrztzlocal.utcoffset�s3��
�:�$�,�,���;�;�r�?��#�#�#��#�#�#rc��|�
|jry|j|�r|j|jz
StSr)rlrprirfrrs  rr ztzlocal.dst�s7��
�:�$�,�,���;�;�r�?��#�#�d�&6�&6�6�6��Krc�>�|j|j|�Sr)rnrprs  rr$ztzlocal.tzname�s���}�}�T�[�[��_�-�-rc�p�|j|�}|xr!||j||jz
�k7S)r&)�
_naive_is_dstrj)rr�	naive_dsts   rr'ztzlocal.is_ambiguous�sA���&�&�r�*�	��
�H��d�0�0��d�o�o�1E�F�F�	Irc�x�t|�}tj|tjz�jSr)�_datetime_to_timestamprd�	localtimere�tm_isdst)rr�	timestamps   rrtztzlocal._naive_is_dsts*��*�2�.�	��~�~�i�$�-�-�7�8�A�A�Arc��|jsy|j|�}t|dd�}|j|�r|�|j	|�Sy|S)NF�foldT)rlrt�getattrr'�_fold)rr�
fold_naive�dstvalr|s     rrpztzlocal._isdsts[��2�|�|���#�#�B�'���r�6�4�(�����R� ����:�:�b�>�)�)���
rc���t|t�r4|j|jk(xr|j|jk(St|t�r5|j
xr&|jddvxr|jtk(St|t�rF|j
xr7|jd|jk(xr|j|jk(StS)Nr>�GMTr")r+rarfrirrlrnrr,rHr.r-r/s  rr1ztzlocal.__eq__.s����e�W�%��$�$��(9�(9�9�:��$�$��(9�(9�9�
;�
��u�
%����$�-��M�M�!�$��6�-��$�$��,�
.���x�
(����$�6��M�M�!�$����3�6��$�$��
�
�5�
7�"�!rNc��||k(Srr#r/s  rr3ztzlocal.__ne__?r4rc�4�d|jjzSr6r7r:s rr;ztzlocal.__repr__Br<r)T)r9r=r>r?rQrr rr$r'rtrpr1r@r3r;rArB�
__classcell__�r8s@rrara�s`����+�$���.��.�I�$B�&�P
"��H�#�0��"�"�Jrrac�<�eZdZgd�Zd�Zd�Zd�ZdZd�Zd�Z	d�Z
y)	�_ttinfo)rP�delta�isdst�abbr�isstd�isgmt�	dstoffsetc�@�|jD]}t||d��yr��	__slots__�setattr)r�attrs  rrQz_ttinfo.__init__Ls!���N�N�	&�D��D�$��%�	&rc���g}|jD]0}t||�}|��|j|�dt|�����2|jj
�ddj
|��d�S)N�=r[r\r])r�r}�appendr^r8r9�join)r�lr��values    rr;z_ttinfo.__repr__Ps`�����N�N�	8�D��D�$�'�E�� ����D�$�u�+�6�7�	8� �>�>�2�2�D�I�I�a�L�A�Arc��t|t�stS|j|jk(xr�|j|jk(xr�|j
|j
k(xrj|j|jk(xrO|j|jk(xr4|j|jk(xr|j|jk(Sr)
r+r�r-rPr�r�r�r�r�r�r/s  rr1z_ttinfo.__eq__Xs����%��)�!�!����u�|�|�+�2��
�
�e�k�k�)�2��
�
�e�k�k�)�2��	�	�U�Z�Z�'�2��
�
�e�k�k�)�	2�
�
�
�e�k�k�)�2����%�/�/�1�
	3rNc��||k(Srr#r/s  rr3z_ttinfo.__ne__fr4rc�L�i}|jD]}t||d�||<�|Sr)r�r}�r�staterOs   r�__getstate__z_ttinfo.__getstate__is1�����N�N�	4�D�!�$��d�3�E�$�K�	4��rc�P�|jD]}||vs�t||||��yrr�r�s   r�__setstate__z_ttinfo.__setstate__os,���N�N�	1�D��u�}���d�E�$�K�0�	1r)r9r=r>r�rQr;r1r@r3r�r�r#rrr�r�Hs/��0�I�&�B�
3��H�#��1rr�c��eZdZdZgd�Zd�Zy)�_tzfilezw
    Lightweight class for holding the relevant transition and time zone
    information read from binary tzfiles.
    )�
trans_list�trans_list_utc�	trans_idx�ttinfo_list�
ttinfo_std�
ttinfo_dst�
ttinfo_before�ttinfo_firstc	�`�|jD]}t|||j|d���!yr)�attrsr��get)r�kwargsr�s   rrQz_tzfile.__init__}s,���J�J�	8�D��D�$��
�
�4�� 6�7�	8rN)r9r=r>r?r�rQr#rrr�r�us���
J�E�8rr�c���eZdZdZd�fd�	Zd�Zd�Zdd�Zd�Zd�Z	d	�Z
dd
�Zd�Zd�Z
d
�Zed��Zd�ZdZd�Zd�Zd�Zd�Z�xZS)�tzfilea�	
    This is a ``tzinfo`` subclass that allows one to use the ``tzfile(5)``
    format timezone files to extract current and historical zone information.

    :param fileobj:
        This can be an opened file stream or a file name that the time zone
        information can be read from.

    :param filename:
        This is an optional parameter specifying the source of the time zone
        information in the event that ``fileobj`` is a file object. If omitted
        and ``fileobj`` is a file stream, this parameter will be set either to
        ``fileobj``'s ``name`` attribute or to ``repr(fileobj)``.

    See `Sources for Time Zone and Daylight Saving Time Data
    <https://data.iana.org/time-zones/tz-link.html>`_ for more information.
    Time zone files can be compiled from the `IANA Time Zone database files
    <https://www.iana.org/time-zones>`_ with the `zic time zone compiler
    <https://www.freebsd.org/cgi/man.cgi?query=zic&sektion=8>`_

    .. note::

        Only construct a ``tzfile`` directly if you have a specific timezone
        file on disk that you want to read into a Python ``tzinfo`` object.
        If you want to get a ``tzfile`` representing a specific IANA zone,
        (e.g. ``'America/New_York'``), you should call
        :func:`dateutil.tz.gettz` with the zone identifier.


    **Examples:**

    Using the US Eastern time zone as an example, we can see that a ``tzfile``
    provides time zone information for the standard Daylight Saving offsets:

    .. testsetup:: tzfile

        from dateutil.tz import gettz
        from datetime import datetime

    .. doctest:: tzfile

        >>> NYC = gettz('America/New_York')
        >>> NYC
        tzfile('/usr/share/zoneinfo/America/New_York')

        >>> print(datetime(2016, 1, 3, tzinfo=NYC))     # EST
        2016-01-03 00:00:00-05:00

        >>> print(datetime(2016, 7, 7, tzinfo=NYC))     # EDT
        2016-07-07 00:00:00-04:00


    The ``tzfile`` structure contains a fully history of the time zone,
    so historical dates will also have the right offsets. For example, before
    the adoption of the UTC standards, New York used local solar  mean time:

    .. doctest:: tzfile

       >>> print(datetime(1901, 4, 12, tzinfo=NYC))    # LMT
       1901-04-12 00:00:00-04:56

    And during World War II, New York was on "Eastern War Time", which was a
    state of permanent daylight saving time:

    .. doctest:: tzfile

        >>> print(datetime(1944, 2, 7, tzinfo=NYC))    # EWT
        1944-02-07 00:00:00-04:00

    Nc�|��tt|��d}t|t�r||_t
|d�}d}n8|�||_n.t|d�r|j|_nt|�|_|�;|st|�}|5}|j|�}ddd�|j�yy#1swY�xYw)NF�rbTrO)
rcr�rQr+r�	_filename�open�hasattrrOr^�_nullcontext�_read_tzfile�_set_tzdata)r�fileobj�filename�file_opened_here�file_stream�tzobjr8s      �rrQztzfile.__init__�s����
�f�d�$�&� ���g�|�,�$�D�N��7�D�)�G�#��
�
!�%�D�N�
�W�f�
%�$�\�\�D�N�!�'�]�D�N���#�&�w�/���
7�K��)�)�+�6��
7�
���U�#��
7�
7�s�B2�2B;c	�b�tjD]}t|d|zt||���y)z= Set the time zone data of this object from a _tzfile object �_N)r�r�r�r})rr�r�s   rr�ztzfile._set_tzdata�s.���M�M�	<�D��D�#��*�g�e�T�&:�;�	<rc	�4
�t�}|jd�j�dk7rtd��|jd�t	j
d|jd��\}}}}}}|r:t
t	j
d|z|j|dz���|_ng|_|r.t	j
d|z|j|��|_ng|_g}	t|�D]6}
|	jt	j
d	|jd
����8|j|�j�}|r#|j|dztj�|r(t	j
d|z|j|��}|r(t	j
d|z|j|��}
g|_t|�D]�}
|	|
\}}}t|�}t!�}||_t%j&d
�|_t%j&|��|_||_|||j/d|�|_||
kDxr|
d
k7|_||
kDxr
|
d
k7|_|jj|���|jD�cgc]}|j|��c}|_d|_d|_d|_|j�r	|js|jd
x|_|_n�t|dz
dd�D]k}
|j|
}|j6s|j,s||_n|j8s|j,r||_|j6s�^|j8s�kn*|j8r|j6s|j8|_|jD]}|j,r�||_n|jd
|_d}d}d}d}g|_tA|j�D]�\}
}|j"}d
}|�6|j,r*|s||z
}|s|r|}t%j&|��|_|}||z
}|}|�||k7r|j,|k7r|}|j,}|}|}|j>j|j|
|z���tC|j�|_tC|j>�|_tC|j�|_|Scc}w)N��TZifzmagic not found�z>6l�z>%dlz>%dBz>lbb��z>%dbrrF�r���)"r��read�decode�
ValueError�struct�unpack�listr�r��ranger��seek�os�SEEK_CURr�rNr�rPrLrMr�r�r��findr�r�r�r�r�r�r�r��	enumeraterm)rr��out�
ttisgmtcnt�
ttisstdcnt�leapcnt�timecnt�typecnt�charcnt�ttinfo�ir�r�r��gmtoffr��abbrind�tti�idx�lastdst�
lastoffset�
lastdstoffset�lastbaseoffsetrPr��
baseoffset�
adjustments                           rr�ztzfile._read_tzfile�s����i���<�<��?�!�!�#�v�-��.�/�/����R��2
�M�M�%����b�!1�2�/	
��
�
�
�
�
��!%�f�m�m�F�W�4D�4;�L�L����4K�'M�"N�C��"$�C���"�M�M�&�7�*:�*1�,�,�w�*?�A�C�M��C�M����w��	B�A��M�M�&�-�-�����Q��@�A�	B��|�|�G�$�+�+�-����L�L��1��b�k�k�2���M�M�&�:�"5�")�,�,�z�":�<�E���M�M�&�:�"5�")�,�,�z�":�<�E�����w��	(�A�%+�A�Y�"�F�E�7�*�6�2�F��)�C��C�J�$�.�.�q�1�C�M� �*�*�6�:�C�I��C�I��G�D�I�I�f�g�$>�?�C�H�#�a��9�E�!�H��M�C�I�#�a��9�E�!�H��M�C�I��O�O�"�"�3�'�	(�:=���G�#�����-�G��
������� ����?�?��%�%�47�O�O�A�4F�F����!1��w�q�y�"�b�1�8�A��-�-��*�C��>�>�#�)�)�),��� �^�^��	�	�),����~�~�#�.�.��8��~�~�c�n�n�),������?�?�;�C��9�9�,/��)��;�
),����(:�C�%����
��
��������
�
�.�	F�F�A�s��Z�Z�F��I��"��9�9�"�$*�Z�$7�	�$��$1�	�$,�$6�$6�y�$I�C�M�$-�M� �)�+�J�#�J��*�z�^�/K��	�	�W�,�+�
��i�i�G��J�'�N��N�N�!�!�#�"4�"4�Q�"7�*�"D�E�?	F�B�c�m�m�,��
��s�~�~�.���"�3�#5�#5�6����
��gHs�0Tc��|jsyt|�}|r|jn|j}tj||�}|dz
S)Nr)�_trans_listrw�_trans_list_utc�bisect�bisect_right)rr�in_utcrzr�r�s      r�_find_last_transitionztzfile._find_last_transition�sL������*�2�.�	�.4�T�)�)��9I�9I�
��!�!�*�i�8���Q�w�rc��|�|dzt|j�k\r|jS|dkr|jS|j|S)Nrr)�lenr��_ttinfo_std�_ttinfo_before�
_trans_idx)rr�s  r�_get_ttinfoztzfile._get_ttinfo�sM���;�3��7�s�4�+;�+;�'<�<��#�#�#���7��&�&�&����s�#�#rc�F�|j|�}|j|�Sr)�_resolve_ambiguous_timer�)rrr�s   r�_find_ttinfoztzfile._find_ttinfo�s#���*�*�2�.������$�$rc�^�t|tj�std��|j|urt	d��|j|d��}|j
|�}|tj|j��z}|j||��}t|t|���S)a
        The ``tzfile`` implementation of :py:func:`datetime.tzinfo.fromutc`.

        :param dt:
            A :py:class:`datetime.datetime` object.

        :raises TypeError:
            Raised if ``dt`` is not a :py:class:`datetime.datetime` object.

        :raises ValueError:
            Raised if this is called with a ``dt`` which does not have this
            ``tzinfo`` attached.

        :return:
            Returns a :py:class:`datetime.datetime` object representing the
            wall time in ``self``'s time zone.
        z&fromutc() requires a datetime argumentzdt.tzinfo is not selfT)r�rF)r��r|)r+rLrJ�tzinfor�r�r�rMrPr'r
r_)rrr�r��dt_outr|s      rr)ztzfile.fromutc�s���(�"�h�/�/�0��D�E�E�
�9�9�D� ��4�5�5��(�(��D�(�9�����s�#���h�(�(����<�<��� � ��S� �1���f�3�t�9�-�-rc���|�|j|�}t|�}|j|�}|�|dkry|j|dz
�j|jz
}|j|}|||zkS)r&rFr)r�rwr�rPr�)rrr�rzr��od�tts       rr'ztzfile.is_ambiguouss����;��,�,�R�0�C�+�2�.�	����s�#���;�#��(��
�
�
�c�A�g�
&�
-�
-��
�
�
:��
�
�
�c�
"���2��7�"�"rc��|j|�}|j|�}|�|dk(r|St|xr|j||��}||z
S)Nr)r�r~r_r')rrr�r~�
idx_offsets     rr�ztzfile._resolve_ambiguous_time(s\���(�(��,���
�
�2����;�#��(��J��U��A�t�'8�'8��S�'A�B�
��Z��rc�b�|�y|jstS|j|�jSr)r�rr�r�rs  rrztzfile.utcoffset5s/��
�:������K�� � ��$�*�*�*rc��|�y|jstS|j|�}|jstS|jSr)�_ttinfo_dstrr�r�r�)rrr�s   rr z
tzfile.dst>s@��
�:������K�����#���y�y��K��}�}�rc�V�|jr|�y|j|�jSr)r�r�r�rs  rr$z
tzfile.tznameNs)�����2�:��� � ��$�)�)�)rc���t|t�stS|j|jk(xr4|j|jk(xr|j
|j
k(Sr)r+r�r-r�r��_ttinfo_listr/s  rr1z
tzfile.__eq__Ts[���%��(�!�!�� � �E�$5�$5�5�8����5�#3�#3�3�8��!�!�U�%7�%7�7�	9rc��||k(Srr#r/s  rr3z
tzfile.__ne__]r4rc�`�|jj�dt|j��d�S�Nr[r])r8r9r^r�r:s rr;ztzfile.__repr__`s ���>�>�2�2�D����4H�I�Irc�$�|jd�Sr)�
__reduce_ex__r:s rrBztzfile.__reduce__cs���!�!�$�'�'rc�L�|jd|jf|jfSr)r8r��__dict__)r�protocols  rrztzfile.__reduce_ex__fs ������t�~�~� 6��
�
�F�Frr�F)r9r=r>r?rQr�r�r�r�r�r)r'r�rr rr$r1r@r3r;rBrr�r�s@rr�r��sz���E�N$�0<�^�@
�	$�%�
".�H#�: �+�� �*��*�
9��H�#�J�(�Grr�c�:�eZdZdZ			dd�Zd�Zd�Zed��Zy)�tzrangea[
    The ``tzrange`` object is a time zone specified by a set of offsets and
    abbreviations, equivalent to the way the ``TZ`` variable can be specified
    in POSIX-like systems, but using Python delta objects to specify DST
    start, end and offsets.

    :param stdabbr:
        The abbreviation for standard time (e.g. ``'EST'``).

    :param stdoffset:
        An integer or :class:`datetime.timedelta` object or equivalent
        specifying the base offset from UTC.

        If unspecified, +00:00 is used.

    :param dstabbr:
        The abbreviation for DST / "Summer" time (e.g. ``'EDT'``).

        If specified, with no other DST information, DST is assumed to occur
        and the default behavior or ``dstoffset``, ``start`` and ``end`` is
        used. If unspecified and no other DST information is specified, it
        is assumed that this zone has no DST.

        If this is unspecified and other DST information is *is* specified,
        DST occurs in the zone but the time zone abbreviation is left
        unchanged.

    :param dstoffset:
        A an integer or :class:`datetime.timedelta` object or equivalent
        specifying the UTC offset during DST. If unspecified and any other DST
        information is specified, it is assumed to be the STD offset +1 hour.

    :param start:
        A :class:`relativedelta.relativedelta` object or equivalent specifying
        the time and time of year that daylight savings time starts. To
        specify, for example, that DST starts at 2AM on the 2nd Sunday in
        March, pass:

            ``relativedelta(hours=2, month=3, day=1, weekday=SU(+2))``

        If unspecified and any other DST information is specified, the default
        value is 2 AM on the first Sunday in April.

    :param end:
        A :class:`relativedelta.relativedelta` object or equivalent
        representing the time and time of year that daylight savings time
        ends, with the same specification method as in ``start``. One note is
        that this should point to the first time in the *standard* zone, so if
        a transition occurs at 2AM in the DST zone and the clocks are set back
        1 hour to 1AM, set the ``hours`` parameter to +1.


    **Examples:**

    .. testsetup:: tzrange

        from dateutil.tz import tzrange, tzstr

    .. doctest:: tzrange

        >>> tzstr('EST5EDT') == tzrange("EST", -18000, "EDT")
        True

        >>> from dateutil.relativedelta import *
        >>> range1 = tzrange("EST", -18000, "EDT")
        >>> range2 = tzrange("EST", -18000, "EDT", -14400,
        ...                  relativedelta(hours=+2, month=4, day=1,
        ...                                weekday=SU(+1)),
        ...                  relativedelta(hours=+1, month=10, day=31,
        ...                                weekday=SU(-1)))
        >>> tzstr('EST5EDT') == range1 == range2
        True

    Nc�*�ddlma||_||_	|j	�}	|j	�}|�tj|��|_	nt|_	|�tj|��|_n8|r+|�)|jtjd��z|_nt|_|r4|�2tjdddtjd���|_
n||_
|r4|�2tjdd	d
tjd���|_n||_|j|jz
|_t!|j�|_y#t
tf$rY��UwxYw#t
tf$rY��ZwxYw)Nr��
relativedeltarFr��hours�r�)r�month�day�weekday�
�r�)�dateutilr�	_std_abbr�	_dst_abbrrIrJrKrLrMrfrri�SU�_start_delta�
_end_delta�_dst_base_offset_rk�hasdst)r�stdabbr�	stdoffset�dstabbrr��start�ends       rrQztzrange.__init__�s|��
	+� ��� ���	�!�/�/�1�I�	�!�/�/�1�I�� �'�1�1�)�D�D��#�D��� �'�1�1�)�D�D��
��.�#�/�/�(�2D�2D�2�2N�N�D��#�D���u�}� -� ;� ;���q�-�2B�2B�2�2F�!<�!H�D��!&�D���s�{�+�9�9����M�4D�4D�R�4H�:�J�D�O�"�D�O�!%�!1�!1�D�4D�4D�!D����4�,�,�-����C�>�*�	��	��
�>�*�	��	�s"�E)�E?�)E<�;E<�?F�Fc��|jsytj|dd�}||jz}||jz}||fS)a�
        For a given year, get the DST on and off transition times, expressed
        always on the standard time side. For zones with no transitions, this
        function returns ``None``.

        :param year:
            The year whose transitions you would like to query.

        :return:
            Returns a :class:`tuple` of :class:`datetime.datetime` objects,
            ``(dston, dstoff)`` for zones with an annual DST transition, or
            ``None`` for fixed offset zones.
        Nr)r%rLr"r#)r�year�	base_yearr)r*s     r�transitionsztzrange.transitions�sJ���{�{���%�%�d�A�q�1�	��D�-�-�-���$�/�/�)���s�|�rc�n�t|t�stS|j|jk(xr�|j|jk(xrj|j
|j
k(xrO|j|jk(xr4|j|jk(xr|j|jk(Sr)	r+rr-rr rfrir"r#r/s  rr1ztzrange.__eq__�s����%��)�!�!����%�/�/�1�4����%�/�/�1�4�� � �E�$5�$5�5�4�� � �E�$5�$5�5�4��!�!�U�%7�%7�7�	4�
���5�#3�#3�3�	5rc��|jSr)r$r:s r�_dst_base_offsetztzrange._dst_base_offsets���%�%�%r)NNNNN)	r9r=r>r?rQr.r1�propertyr1r#rrrrjs8��I�T+/�)-�!%�-.�^�0	5��&��&rrc�&�eZdZdZdd�Zdd�Zd�Zy)�tzstra�
    ``tzstr`` objects are time zone objects specified by a time-zone string as
    it would be passed to a ``TZ`` variable on POSIX-style systems (see
    the `GNU C Library: TZ Variable`_ for more details).

    There is one notable exception, which is that POSIX-style time zones use an
    inverted offset format, so normally ``GMT+3`` would be parsed as an offset
    3 hours *behind* GMT. The ``tzstr`` time zone object will parse this as an
    offset 3 hours *ahead* of GMT. If you would like to maintain the POSIX
    behavior, pass a ``True`` value to ``posix_offset``.

    The :class:`tzrange` object provides the same functionality, but is
    specified using :class:`relativedelta.relativedelta` objects. rather than
    strings.

    :param s:
        A time zone string in ``TZ`` variable format. This can be a
        :class:`bytes` (2.x: :class:`str`), :class:`str` (2.x:
        :class:`unicode`) or a stream emitting unicode characters
        (e.g. :class:`StringIO`).

    :param posix_offset:
        Optional. If set to ``True``, interpret strings such as ``GMT+3`` or
        ``UTC+3`` as being 3 hours *behind* UTC rather than ahead, per the
        POSIX standard.

    .. caution::

        Prior to version 2.7.0, this function also supported time zones
        in the format:

            * ``EST5EDT,4,0,6,7200,10,0,26,7200,3600``
            * ``EST5EDT,4,1,0,7200,10,-1,0,7200,3600``

        This format is non-standard and has been deprecated; this function
        will raise a :class:`DeprecatedTZFormatWarning` until
        support is removed in a future version.

    .. _`GNU C Library: TZ Variable`:
        https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html
    c	�R�ddlma||_tj	|�}|�|j
rt
d��|jdvr|s|xjdzc_tj||j|j|j|jdd��|jsd|_
d|_nN|j|j �|_
|jr"|j|j"d�	�|_t%|j�|_y)
Nr)�_parserzunknown string format�r�r"r�F)r)r*r)�isend)�dateutil.parserr6�parser�_s�_parsetz�any_unused_tokensr�r&r'rrQr(r�r"r#�_deltar)r*rkr%)r�s�posix_offset�ress    rrQztzstr.__init__7s���5�����o�o�a� ���;�#�/�/��4�5�5��;�;�.�(���M�M�R��M�
	����s�{�{�C�M�M����c�m�m�$�%�	�	1��{�{� $�D��"�D�O� $���C�I�I� 6�D��� � �"&�+�+�c�g�g�Q�+�"?����4�,�,�-��rc��ddlm}i}|j�{|j|d<|j�D|j|j|j�|d<|jdkDrd|d<nYd|d<nS|j
rG|j
|d<n7|j�|j|d<n|j�|j|d	<|s?|sd
|d<d|d<|jd�|d<nd|d<d|d<|jd�|d<|j�|j|d
<nd|d
<|r@|j|jz
}|d
xx|j|jdzzzcc<|jdi|��S)Nrrrrrrr�yearday�	nlyeardayr�rr�rGi i�Qr#)rrrr�weekr�yday�jydayr!rdrirfrG�days)r�xr8rr�r�s      rr>ztzstr._deltaWsx��*����7�7���g�g�F�7�O��y�y�$�$1�$9�$9�!�)�)�Q�V�V�$L��y�!��6�6�A�:�$%�F�5�M�$&�F�5�M���� !����u�
�
�V�V�
� !���F�9��
�W�W�
 �"#�'�'�F�;����"#��w�� !��u�
�$1�$4�$4�R�$8��y�!�"$��w�� "��u�
�$1�$4�$4�R�$8��y�!��6�6�� !���F�9��!%�F�9����$�$�t�'7�'7�7�E��9��������e�1C�!C�C��*�}�*�*�4�V�4�4rc�`�|jj�dt|j��d�Sr
�r8r9r^r;r:s rr;ztzstr.__repr__�����>�>�2�2�D����M�B�BrNr)r)r9r=r>r?rQr>r;r#rrr4r4s��(�R.�@'5�RCrr4c��eZdZ	dd�Zy)�_tzicalvtzcompNc���tj|��|_tj|��|_|j|jz
|_||_||_||_yrE)rLrM�tzoffsetfrom�
tzoffsetto�tzoffsetdiffr�r$�rrule)rrPrQr�r$rSs      rrQz_tzicalvtzcomp.__init__�sS��$�.�.�|�D���"�,�,�Z�@��� �O�O�d�.?�.?�?�����
������
r)NN)r9r=r>rQr#rrrNrN�s
��$(�rrNc�h��eZdZgf�fd�	Zd�Zd�Zd�Zd�Zed��Z	d�Z
ejZ�xZ
S)�
_tzicalvtzc���tt|��||_||_g|_g|_tj�|_	yr)
rcrUrQ�_tzid�_comps�
_cachedate�
_cachecompr�
allocate_lock�_cache_lock)r�tzid�compsr8s   �rrQz_tzicalvtz.__init__�s=���
�j�$�(�*���
����������"�0�0�2��rc�z�t|j�dk(r|jdS|jd��}	|j5|j|j
j
||j|�f�cddd�S#1swYnxYwn#t$rYnwxYwd}d}|jD]#}|j||�}|s�|r||ks� |}|}�%|s&|jD]}|jr�|}nd}|j5|j
jd||j|�f�|jjd|�t|j
�dkDr4|j
j�|jj�ddd�|S#1swY|SxYw)Nrr�r�r)
r�rX�replacer\rZrY�indexr~r��_find_compdtr��insert�pop)rr�
lastcompdt�lastcomp�comp�compdts      r�
_find_compz_tzicalvtz._find_comp�s����t�{�{��q� ��;�;�q�>�!�
�Z�Z�t�Z�
$��	��!�!�
+����t���'<�'<�����B��(�(*�+�
+�
+�
+��
+���	��	���
����K�K�	 �D��&�&�t�R�0�F��z�Z�&�-@�#�
���	 ��
���
#���z�z�#�H��
#�
 ��7��
�
�
�	&��O�O�"�"�1�r�4�:�:�b�>�&:�;��O�O�"�"�1�h�/��4�?�?�#�b�(����#�#�%����#�#�%�
	&���	&���s6�B�9B
�	B�
B�B�	B#�"B#�BF0�0F:c��|jtkr |j|�r||jz}|jj	|d��}|S)NT)�inc)rRrr~rS�before)rrhrris    rrcz_tzicalvtz._find_compdt�sH�����t�#��
�
�2���$�#�#�#�B����"�"�2�4�"�0���
rc�>�|�y|j|�jSr)rjrQrs  rrz_tzicalvtz.utcoffset�s��
�:�����r�"�-�-�-rc�`�|j|�}|jr|jStSr)rjr�rRr)rrrhs   rr z_tzicalvtz.dst�s(�����r�"���:�:��$�$�$��Krc�8�|j|�jSr)rjr$rs  rr$z_tzicalvtz.tzname�s�����r�"�)�)�)rc�2�dt|j�zS)Nz<tzicalvtz %s>)r^rWr:s rr;z_tzicalvtz.__repr__�s���$�t�z�z�"2�2�2r)r9r=r>rQrjrcrr rr$r;rArBr�r�s@rrUrU�sF���#%�3�+�Z�.���*��*�3��"�"�JrrUc�6�eZdZdZd�Zd�Zd	d�Zd�Zd�Zd�Z	y)
�tzicala[
    This object is designed to parse an iCalendar-style ``VTIMEZONE`` structure
    as set out in `RFC 5545`_ Section 4.6.5 into one or more `tzinfo` objects.

    :param `fileobj`:
        A file or stream in iCalendar format, which should be UTF-8 encoded
        with CRLF endings.

    .. _`RFC 5545`: https://tools.ietf.org/html/rfc5545
    c��ddlmat|t�r||_t|d�}n&t
|dt|��|_t|�}i|_	|5}|j|j��ddd�y#1swYyxYw)Nr)rS�rrO)rrSr+rr;r�r}r^r��_vtz�
_parse_rfcr�)rr��fobjs   rrQztzical.__init__�ss��"��g�|�,��D�G��7�C�(�G��g�v�t�G�}�=�D�G�"�7�+�G���	�
�	)���O�O�D�I�I�K�(�	)�	)�	)�s� B�Bc�H�t|jj��S)z?
        Retrieves the available time zones as a list.
        )r�rv�keysr:s rrzztzical.keyss���D�I�I�N�N�$�%�%rNc��|�dt|j�dk(rtd��t|j�dkDrtd��tt	|j��}|jj|�S)a�
        Retrieve a :py:class:`datetime.tzinfo` object by its ``tzid``.

        :param tzid:
            If there is exactly one time zone available, omitting ``tzid``
            or passing :py:const:`None` value returns it. Otherwise a valid
            key (which can be retrieved from :func:`keys`) is required.

        :raises ValueError:
            Raised if ``tzid`` is not specified but there are either more
            or fewer than 1 zone defined.

        :returns:
            Returns either a :py:class:`datetime.tzinfo` object representing
            the relevant time zone or :py:const:`None` if the ``tzid`` was
            not found.
        rzno timezones definedrz more than one timezone available)r�rvr��next�iterr�)rr]s  rr�z
tzical.getsf��$�<��4�9�9�~��"� �!7�8�8��T�Y�Y��!�#� �!C�D�D���T�Y�Y��(�D��y�y�}�}�T�"�"rc�z�|j�}|std��|ddvrd|ddk(}|dd}nd}t|�dk(r&t|dd�d	zt|dd�d
zz|zSt|�dk(r5t|dd�d	zt|dd�d
zzt|dd�z|zStd|z��)
Nzempty offsetr)�+�-)r�rrrr�ri�<r�zinvalid offset: )�stripr�r�r_)rr?�signals   r�
_parse_offsetztzical._parse_offset"s���
�G�G�I����^�,�,��Q�4�:���a��d�c�k�*�F��!�"��A��F��q�6�Q�;���"�1��J��%��A�a�b�E�
�R��7�6�A�A�
��V�q�[���"�1��J��%��A�a��F��b�(8�8�3�q���u�:�E��O�O��/�!�3�4�4rc��|j�}|std��d}|t|�krQ||j�}|s||=n)|dkDr|ddk(r||dz
xx|ddz
cc<||=n|dz
}|t|�kr�Qd}g}d}d}|D�]t}|s�|j	dd�\}	}
|	j	d�}|std��|dj�}	|dd}|�r|	d	k(r |
d
vrntd|
z��|
}d}d}
d}g}d}�z|	dk(r�|
d
k(rF|rtd|z��|std��|std��t
||�|j|<d}��|
|k(rzstd��
�td���td��d}r(tjdj|�ddd��}t|
||dk(|�}|j|�d}��Itd|
z��|r�|	dk(r1|D]}|dk7s�	d|z}t|��j|�d}���|	dvrj|����|	dk(r*|rtd|	�d|d�d���|j|
�}
���|	dk(r&|rtd |dz��|j|
�}��|	d!k(r|rtd"|dz��|
}��|	d#k(r��#td$|	z��|	d%k(r|rtd&|dz��|
}��M|	d'vr��Std$|	z��|	d	k(s��h|
d
k(s��od}g}d}��wy)(Nzempty stringr� rF�:�;zempty property name�BEGIN)�STANDARD�DAYLIGHTzunknown component: �END�	VTIMEZONEzcomponent not closed: zmandatory TZID not foundz at least one component is neededzmandatory DTSTART not foundz mandatory TZOFFSETFROM not found�
T)�
compatible�ignoretz�cacher�zinvalid component end: �DTSTARTzVALUE=DATE-TIMEz(Unsupported DTSTART param in VTIMEZONE: )�RRULE�RDATE�EXRULE�EXDATE�TZOFFSETFROMzunsupported z parm: �
TZOFFSETTOzunsupported TZOFFSETTO parm: �TZNAMEzunsupported TZNAME parm: �COMMENTzunsupported property: �TZIDzunsupported TZID parm: )�TZURLz
LAST-MODIFIEDr�)�
splitlinesr�r��rstrip�split�upperrUrvrS�rrulestrr�rNr�r�)rr?�linesr��liner]r^�invtz�comptyperOr��parms�founddtstartrPrQ�
rrulelinesr$�rrrh�parm�msgs                     rrwztzical._parse_rfc2s����������^�,�,�
���#�e�*�n���8�?�?�$�D���!�H��Q��4��7�c�>��a��c�
�d�1�2�h�&�
��!�H��Q����#�e�*�n����������f	�D����*�*�S�!�,�K�D�%��J�J�s�O�E�� �!6�7�7���8�>�>�#�D��!�"�I�E���7�?�� 8�8��(�)>�u�)D�E�E�$�H�#(�L�#'�L�!%�J�!#�J�!�F��U�]���+�#�",�-E�h�-N�"O�O�#�",�-G�"H�H�$�",� B�#D�D�+5�T�5�*A��	�	�$�� %���(�*�+�",�-J�"K�K�'�/�",� B�#D�D�%�-�",� B�#D�D�"��%�!&����	�	�*�0E�;?�9=�6:�"0�"<�B� .�l�J�/7�:�/E�.4�b� :�����T�*�#'��(�)B�5�)H�I�I���y�(�%*�6�D�#�'8�8�(5�7;�(<��&0��o� 5�	6�
#�)�)�$�/�'+���!G�G�"�)�)�$�/���/� �",�>B�E�!�H� M�#O�O�'+�'9�'9�%�'@����-� �",� ?��a�� H�#J�J�%)�%7�%7��%>�
���)� �",� ;�E�!�H� D�#F�F�!&����*��(�)A�$�)F�G�G��v�~� �",� 9�%��(� B�#D�D�$���!F�F��(�)A�$�)F�G�G����U�k�%9�������Mf	rc�`�|jj�dt|j��d�Sr
rKr:s rr;ztzical.__repr__�rLrr)
r9r=r>r?rQrzr�r�rwr;r#rrrsrs�s(��	�)�"&�#�65� {�zCrrs�win32z/etc/localtimerx)z/usr/share/zoneinfoz/usr/lib/zoneinfoz/usr/share/lib/zoneinfoz
/etc/zoneinfoc�b��tf�t�
�tfz
�G�fd�dt�}|�S)Nc�B��eZdZdZd�Zd�fd�	Zd�Zd�Zedd��Z	y)	�__get_gettz.<locals>.GettzFunca	
        Retrieve a time zone object from a string representation

        This function is intended to retrieve the :py:class:`tzinfo` subclass
        that best represents the time zone that would be used if a POSIX
        `TZ variable`_ were set to the same value.

        If no argument or an empty string is passed to ``gettz``, local time
        is returned:

        .. code-block:: python3

            >>> gettz()
            tzfile('/etc/localtime')

        This function is also the preferred way to map IANA tz database keys
        to :class:`tzfile` objects:

        .. code-block:: python3

            >>> gettz('Pacific/Kiritimati')
            tzfile('/usr/share/zoneinfo/Pacific/Kiritimati')

        On Windows, the standard is extended to include the Windows-specific
        zone names provided by the operating system:

        .. code-block:: python3

            >>> gettz('Egypt Standard Time')
            tzwin('Egypt Standard Time')

        Passing a GNU ``TZ`` style string time zone specification returns a
        :class:`tzstr` object:

        .. code-block:: python3

            >>> gettz('AEST-10AEDT-11,M10.1.0/2,M4.1.0/3')
            tzstr('AEST-10AEDT-11,M10.1.0/2,M4.1.0/3')

        :param name:
            A time zone name (IANA, or, on Windows, Windows keys), location of
            a ``tzfile(5)`` zoneinfo file or ``TZ`` variable style time zone
            specifier. An empty string, no argument or ``None`` is interpreted
            as local time.

        :return:
            Returns an instance of one of ``dateutil``'s :py:class:`tzinfo`
            subclasses.

        .. versionchanged:: 2.7.0

            After version 2.7.0, any two calls to ``gettz`` using the same
            input strings will return the same object:

            .. code-block:: python3

                >>> tz.gettz('America/Chicago') is tz.gettz('America/Chicago')
                True

            In addition to improving performance, this ensures that
            `"same zone" semantics`_ are used for datetimes in the same zone.


        .. _`TZ variable`:
            https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html

        .. _`"same zone" semantics`:
            https://blog.ganssle.io/articles/2018/02/aware-datetime-arithmetic.html
        c��tj�|_d|_t	�|_t
j�|_y)Nr�)	�weakref�WeakValueDictionary�_GettzFunc__instances�_GettzFunc__strong_cache_sizer�_GettzFunc__strong_cacherr[r\r:s rrQz'__get_gettz.<locals>.GettzFunc.__init__	s6��&�:�:�<�D��'(�D�$�"-�-�D��&�4�4�6�D�rNc����|j5|jj|d�}|�=|j|��}|�t	|��s|�||j|<n|cddd�S|j
j
||�|j
|<t|j
�|jkDr|j
jd��ddd�|S#1swYSxYw)N)rOF��last)
r\r�r��nocacher+r�rer�r��popitem)rrO�rv�tzlocal_classess   �r�__call__z'__get_gettz.<locals>.GettzFunc.__call__s�����!�!�
<��%�%�)�)�$��5���:����4��0�B� �L�)�"�o�>�!�z�24��(�(��.� "�#
<�
<�&-1�,?�,?�,C�,C�D�"�,M��#�#�D�)��t�*�*�+�d�.F�.F�F��'�'�/�/�U�/�;�-
<�0�I�1
<�0�I�s�AC�*A'C�C%c���|j5||_t|j�|kDr5|jj	d��t|j�|kDr�5ddd�y#1swYyxYw)NFr�)r\r�r�r�r�)r�sizes  r�set_cache_sizez-__get_gettz.<locals>.GettzFunc.set_cache_size+sg���!�!�
<�+/��(��$�-�-�.��5��'�'�/�/�U�/�;��$�-�-�.��5�
<�
<�
<�s�AA+�+A4c��|j5tj�|_|jj�ddd�y#1swYyxYwr)r\r�r�r�r��clearr:s r�cache_clearz*__get_gettz.<locals>.GettzFunc.cache_clear1sC���!�!�
,�#*�#>�#>�#@�� ��#�#�)�)�+�
,�
,�
,�s�4A
�
Ac��d}|s	tjd}|�|dvr�tD]�}tjj|�sO|}tD]C}tjj||�}tjj|�s�Cn�qtjj|�s��	t|�}|St�}|S	|jd�r|dd}tjj|�r0tjj|�r
t|�}|Sd}|StD]�}tjj||�}tjj|�s2|j)dd�}tjj|�s�t	t|�}|Sd}t*�	t+|�}|sB|D]}|d	vs�	t1|�}|S|d
vrt2}|S|t4j6vr
t�}|S#t$rY��wxYw#tttf$rY��wxYw#t$r>}t!|t"�r"d}t%j&t|�|�n�Yd}~���d}~wwxYw#tttf$rY��jwxYw#t,t.f$rd}Y��wxYw#t$rY|SwxYw)zA non-cached version of gettzN�TZ)�r�r�rz'gettz argument should be str, not bytesr�r��
0123456789r7)r��environ�KeyError�TZFILES�path�isabs�TZPATHSr��isfiler��IOError�OSErrorr�ra�
startswithrJr+�bytes�six�
raise_fromrar�WindowsError�UnicodeEncodeErrorr4r"rdr$)rO�tz�filepathr�r��e�new_msg�cs        rr�z&__get_gettz.<locals>.GettzFunc.nocache6s����B����:�:�d�+�D��|�t�y�0� '�#�H��7�7�=�=��2�#+��$+�%�D�')�w�w�|�|�D�(�'C�H�!�w�w�~�~�h�7� %�%�
%��w�w�~�~�h�/�!�!'��!1�B�!�t�I�M#� !��B�l�I�i����s�+�#�A�B�x���7�7�=�=��&��w�w�~�~�d�+�#�D�\��R�I�O"��N�I�K!(�$3��#%�7�7�<�<��d�#;��!�w�w�~�~�h�7�'/�'7�'7��S�'A�H�#%�7�7�>�>�(�#;� (�!�!'��!1�B�!�:�I�K$3�"�� �,�*�%*�4�[��
 "�%)�3��
$%��#4�%-�-2�4�[��%*��I�!3�$(�>�#9�),�B��I�&*�T�[�[�%8�)0��B��I��S ����� !(��*�=�!� �!��!��!�$��.�"K�����y��'9�1�=��>����*!(��*�=�!� �!��%1�2D�#E�*�%)��*��,6�%-�(,�$)��I�%-�sq�H�7H,�I�3J�J,�#K�	H)�(H)�,I�I�	J�3J	�	J�J)�(J)�,K�?K�	K�Kr)
r9r=r>r?rQr�r�r��staticmethodr�)r�s�r�	GettzFuncr��s4���D	�J	7�	�6	<�	,�

�O	�
�O	rr�)rarrA)r�r�s @r�__get_gettzr��s5����j�O����J�=�(��C�F�C�J�;�rc��|�#|j�td��|j}|jd��}|j|��jt�j|�}|jd��}||k(S)a
    Given a datetime and a time zone, determine whether or not a given datetime
    would fall in a gap.

    :param dt:
        A :class:`datetime.datetime` (whose time zone will be ignored if ``tz``
        is provided.)

    :param tz:
        A :class:`datetime.tzinfo` with support for the ``fold`` attribute. If
        ``None`` or not provided, the datetime's own time zone will be used.

    :return:
        Returns a boolean value whether or not the "wall time" exists in
        ``tz``.

    .. versionadded:: 2.7.0
    N�,Datetime is naive and no time zone provided.r`)r�r�ra�
astimezoner")rr��dt_rts   r�datetime_existsr��sz��&
�z�
�9�9���K�L�L�
�Y�Y��	���4��	 �B�
�J�J�b�J�!�,�,�S�1�<�<�R�@�E��M�M��M�&�E�
��;�rc��|�#|j�td��|j}t|dd�}|�	|j|�S|j|��}t
|d��}t
|d��}|j�|j�k(}|j�|j�k(}|xr|S#t$rY��wxYw)a\
    Given a datetime and a time zone, determine whether or not a given datetime
    is ambiguous (i.e if there are two times differentiated only by their DST
    status).

    :param dt:
        A :class:`datetime.datetime` (whose time zone will be ignored if ``tz``
        is provided.)

    :param tz:
        A :class:`datetime.tzinfo` with support for the ``fold`` attribute. If
        ``None`` or not provided, the datetime's own time zone will be used.

    :return:
        Returns a boolean value whether or not the "wall time" is ambiguous in
        ``tz``.

    .. versionadded:: 2.6.0
    Nr�r'r`rr�r)	r�r�r}r'�	Exceptionrar
rr )rr��is_ambiguous_fn�wall_0�wall_1�same_offset�same_dsts       r�datetime_ambiguousr��s���(
�z�
�9�9���K�L�L�
�Y�Y���b�.�$�7�O��"�	��?�?�2�&�&�
���2��	�B�
�B�Q�
�F�
�B�Q�
�F��"�"�$��(8�(8�(:�:�K��z�z�|�v�z�z�|�+�H��(��)�)���	��	�s�B<�<	C�Cc���|j�at|�sV|tjd��zj	�}|tjd��z
j	�}|||z
z
}|S)aZ
    Given a datetime that may be imaginary, return an existing datetime.

    This function assumes that an imaginary datetime represents what the
    wall time would be in a zone had the offset transition not occurred, so
    it will always fall forward by the transition's change in offset.

    .. doctest::

        >>> from dateutil import tz
        >>> from datetime import datetime
        >>> NYC = tz.gettz('America/New_York')
        >>> print(tz.resolve_imaginary(datetime(2017, 3, 12, 2, 30, tzinfo=NYC)))
        2017-03-12 03:30:00-04:00

        >>> KIR = tz.gettz('Pacific/Kiritimati')
        >>> print(tz.resolve_imaginary(datetime(1995, 1, 1, 12, 30, tzinfo=KIR)))
        1995-01-02 12:30:00+14:00

    As a note, :func:`datetime.astimezone` is guaranteed to produce a valid,
    existing datetime, so a round-trip to and from UTC is sufficient to get
    an extant datetime, however, this generally "falls back" to an earlier time
    rather than falling forward to the STD side (though no guarantees are made
    about this behavior).

    :param dt:
        A :class:`datetime.datetime` which may or may not exist.

    :return:
        Returns an existing :class:`datetime.datetime`. If ``dt`` was not
        imaginary, the datetime returned is guaranteed to be the same object
        passed to the function.

    .. versionadded:: 2.7.0
    r�r)r�r�rLrMr)r�curr_offset�
old_offsets   r�resolve_imaginaryr��sf��H
�y�y��_�R�%8��H�.�.�R�8�8�C�C�E���8�-�-�B�7�7�B�B�D�
�
�k�J�&�&��
�Irc�P�|jd��tz
j�S)z�
    Convert a :class:`datetime.datetime` object to an epoch timestamp in
    seconds since January 1, 1970, ignoring the time zone.
    Nr`)ra�EPOCHrI)rs rrwrw
s#��

�J�J�d�J�#�e�+�:�:�<�<r)�r�c��|Srr#)�
second_offsets rrNrNs���rc� �|}d|dzdzz}|S)Nr��r#)r�r��calculated_offsets   rrNrNs$��
#�
��=�2�#5�"�"<�=�� � r)�nullcontextc�"�eZdZdZd�Zd�Zd�Zy)r�zj
        Class for wrapping contexts so that they are passed through in a
        with statement.
        c��||_yr��context)rr�s  rrQz_nullcontext.__init__,s	��"�D�Lrc��|jSrr�r:s r�	__enter__z_nullcontext.__enter__/s���<�<�rc��yrr#)�argsr�s  r�__exit__z_nullcontext.__exit__2s��rN)r9r=r>r?rQr�rr#rrr�r�'s��	�	#�	 �	rr�r)@r?rLr�rd�sysr�r�r��collectionsrr�r�	six.movesr�_commonrrr	r
r�
_factoriesrr
r�winrr�ImportError�warningsrrMrr��	toordinal�EPOCHORDINAL�
add_metaclassr�rr"r,rarAr�r�r�rr4rNrUrs�platformr�r�r��gettzr�r�r�rw�version_inforN�
contextlibr�r�r#rr�<module>rs>����
��
�	�
��#�
���/�(�-�6�%��&�
��x���!�������$��1�a��+����� ������<� �Q#�H�O�O�Q#�!�Q#�n�g������#�$�A#�x���A#�%�A#�H|#�g�|#�~*1�f�*1�Z
8�f�
8�eG�W�eG�P_&�k�_&�D����=�!�tC�G�tC�"�tC�n�V��S#��S#�lKC�V�KC�\�<�<�7����-�G� �G�
�G��G�J�Z	�
����D+*�\+�\=����v���!��6��O8����E�J���P8�
��v��
�s$�G�?G�	G�G�G)�(G)
¿Qué es la limpieza dental de perros? - Clínica veterinaria


Es la eliminación del sarro y la placa adherida a la superficie de los dientes mediante un equipo de ultrasonidos que garantiza la integridad de las piezas dentales a la vez que elimina en profundidad cualquier resto de suciedad.

A continuación se procede al pulido de los dientes mediante una fresa especial que elimina la placa bacteriana y devuelve a los dientes el aspecto sano que deben tener.

Una vez terminado todo el proceso, se mantiene al perro en observación hasta que se despierta de la anestesia, bajo la atenta supervisión de un veterinario.

¿Cada cuánto tiempo tengo que hacerle una limpieza dental a mi perro?

A partir de cierta edad, los perros pueden necesitar una limpieza dental anual o bianual. Depende de cada caso. En líneas generales, puede decirse que los perros de razas pequeñas suelen acumular más sarro y suelen necesitar una atención mayor en cuanto a higiene dental.


Riesgos de una mala higiene


Los riesgos más evidentes de una mala higiene dental en los perros son los siguientes:

  • Cuando la acumulación de sarro no se trata, se puede producir una inflamación y retracción de las encías que puede descalzar el diente y provocar caídas.
  • Mal aliento (halitosis).
  • Sarro perros
  • Puede ir a más
  • Las bacterias de la placa pueden trasladarse a través del torrente circulatorio a órganos vitales como el corazón ocasionando problemas de endocarditis en las válvulas. Las bacterias pueden incluso acantonarse en huesos (La osteomielitis es la infección ósea, tanto cortical como medular) provocando mucho dolor y una artritis séptica).

¿Cómo se forma el sarro?

El sarro es la calcificación de la placa dental. Los restos de alimentos, junto con las bacterias presentes en la boca, van a formar la placa bacteriana o placa dental. Si la placa no se retira, al mezclarse con la saliva y los minerales presentes en ella, reaccionará formando una costra. La placa se calcifica y se forma el sarro.

El sarro, cuando se forma, es de color blanquecino pero a medida que pasa el tiempo se va poniendo amarillo y luego marrón.

Síntomas de una pobre higiene dental
La señal más obvia de una mala salud dental canina es el mal aliento.

Sin embargo, a veces no es tan fácil de detectar
Y hay perros que no se dejan abrir la boca por su dueño. Por ejemplo…

Recientemente nos trajeron a la clínica a un perro que parpadeaba de un ojo y decía su dueño que le picaba un lado de la cara. Tenía molestias y dificultad para comer, lo que había llevado a sus dueños a comprarle comida blanda (que suele ser un poco más cara y llevar más contenido en grasa) durante medio año. Después de una exploración oftalmológica, nos dimos cuenta de que el ojo tenía una úlcera en la córnea probablemente de rascarse . Además, el canto lateral del ojo estaba inflamado. Tenía lo que en humanos llamamos flemón pero como era un perro de pelo largo, no se le notaba a simple vista. Al abrirle la boca nos llamó la atención el ver una muela llena de sarro. Le realizamos una radiografía y encontramos una fístula que llegaba hasta la parte inferior del ojo.

Le tuvimos que extraer la muela. Tras esto, el ojo se curó completamente con unos colirios y una lentilla protectora de úlcera. Afortunadamente, la úlcera no profundizó y no perforó el ojo. Ahora el perro come perfectamente a pesar de haber perdido una muela.

¿Cómo mantener la higiene dental de tu perro?
Hay varias maneras de prevenir problemas derivados de la salud dental de tu perro.

Limpiezas de dientes en casa
Es recomendable limpiar los dientes de tu perro semanal o diariamente si se puede. Existe una gran variedad de productos que se pueden utilizar:

Pastas de dientes.
Cepillos de dientes o dedales para el dedo índice, que hacen más fácil la limpieza.
Colutorios para echar en agua de bebida o directamente sobre el diente en líquido o en spray.

En la Clínica Tus Veterinarios enseñamos a nuestros clientes a tomar el hábito de limpiar los dientes de sus perros desde que son cachorros. Esto responde a nuestro compromiso con la prevención de enfermedades caninas.

Hoy en día tenemos muchos clientes que limpian los dientes todos los días a su mascota, y como resultado, se ahorran el dinero de hacer limpiezas dentales profesionales y consiguen una mejor salud de su perro.


Limpiezas dentales profesionales de perros y gatos

Recomendamos hacer una limpieza dental especializada anualmente. La realizamos con un aparato de ultrasonidos que utiliza agua para quitar el sarro. Después, procedemos a pulir los dientes con un cepillo de alta velocidad y una pasta especial. Hacemos esto para proteger el esmalte.

La frecuencia de limpiezas dentales necesaria varía mucho entre razas. En general, las razas grandes tienen buena calidad de esmalte, por lo que no necesitan hacerlo tan a menudo e incluso pueden pasarse la vida sin requerir una limpieza. Sin embargo, razas pequeñas como el Yorkshire o el Maltés, deben hacérselas todos los años desde cachorros si se quiere conservar sus piezas dentales.

Otro factor fundamental es la calidad del pienso. Algunas marcas han diseñado croquetas que limpian la superficie del diente y de la muela al masticarse.

Ultrasonido para perros

¿Se necesita anestesia para las limpiezas dentales de perros y gatos?

La limpieza dental en perros no es una técnica que pueda practicarse sin anestesia general , aunque hay veces que los propietarios no quieren anestesiar y si tiene poco sarro y el perro es muy bueno se puede intentar…… , pero no se va a poder pulir ni acceder a todas la zona de la boca …. Además los limpiadores dentales van a irrigar agua y hay riesgo de aspiración a vías respiratorias si no se realiza una anestesia correcta con intubación traqueal . En resumen , sin anestesia no se va hacer una correcta limpieza dental.

Tampoco sirve la sedación ya que necesitamos que el animal esté totalmente quieto, y el veterinario tenga un acceso completo a todas sus piezas dentales y encías.

Alimentos para la limpieza dental

Hay que tener cierto cuidado a la hora de comprar determinados alimentos porque no todos son saludables. Algunos tienen demasiado contenido graso, que en exceso puede causar problemas cardiovasculares y obesidad.

Los mejores alimentos para los dientes son aquellos que están elaborados por empresas farmacéuticas y llevan componentes químicos con tratamientos específicos para el diente del perro. Esto implica no solo limpieza a través de la acción mecánica de morder sino también un tratamiento antibacteriano para prevenir el sarro.

Conclusión

Si eres como la mayoría de dueños, por falta de tiempo , es probable que no estés prestando la suficiente atención a la limpieza dental de tu perro. Por eso te animamos a que comiences a limpiar los dientes de tu perro y consideres atender a su higiene bucal con frecuencia.

Estas simples medidas pueden conllevar a que tu perro tenga una vida más larga y mucho más saludable.

Si te resulta imposible introducir un cepillo de dientes a tu perro en la boca, pásate con él por clínica Tus Veterinarios y te explicamos cómo hacerlo.

Necesitas hacer una limpieza dental profesional a tu mascota?
Llámanos al 622575274 o contacta con nosotros

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

¡Hola!