JFIF$        dd7 

Viewing File: /usr/lib/python3.9/site-packages/pyrfc3339/__pycache__/utils.cpython-39.opt-1.pyc

a

��QbQ
�@sLddlmZddlmZmZddlmZGdd�de�Zdd�Zdd	�Z	d
S)�)�division)�	timedelta�tzinfo)�deepcopyc@s@eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�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>

    cCsPt�|�|dkrtd��|dkr*|d9}t||d�|_dtt|j��|_dS)zK
        Create a new FixedOffset instance with the given offset.

        rzminutes must not be negative���)�hours�minutesZUTCN)r�__init__�
ValueErrorr�_FixedOffset__offset�timezone�timedelta_seconds�_FixedOffset__name)�selfrr	�r�3/usr/lib/python3.9/site-packages/pyrfc3339/utils.pyr
(s
�zFixedOffset.__init__cCstd�S)zG
        Return offset for DST.  Always returns timedelta(0).

        r)r�rZdtrrr�dst6szFixedOffset.dstcCs|jS)z*
        Return offset from UTC.

        )rrrrr�	utcoffset=szFixedOffset.utcoffsetcCs|jS)z+
        Return name of timezone.

        )rrrrr�tznameDszFixedOffset.tznamecCsd�|�d��S)Nz<{0}>)�formatr)rrrr�__repr__KszFixedOffset.__repr__cCsF|j}|�|�}||t|�<|j��D]\}}t||t||��q&|S)N)�	__class__�__new__�id�__dict__�items�setattrr)r�memo�cls�result�k�vrrr�__deepcopy__Ns
zFixedOffset.__deepcopy__N)
�__name__�
__module__�__qualname__�__doc__r
rrrrr$rrrrrs rcCsXztt|����WStyR|j}|j}|j}tt|d||d��YS0dS)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@BN)�int�roundZ
total_seconds�AttributeError�days�seconds�microseconds)Ztdr,r-r.rrrrWsrcCsJtt|�d�\}}tt|�d�}|dkr0d}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�absr*�floatrr))rrr-r	�signrrrr
zsr
N)
Z
__future__rZdatetimerr�copyrrrr
rrrr�<module>s
P#
Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF<_W ԣsKcëIzyQy/_LKℂ;C",pFA:/]=H  ~,ls/9ć:[=/#f;)x{ٛEQ )~ =𘙲r*2~ a _V=' kumFD}KYYC)({ *g&f`툪ry`=^cJ.I](*`wq1dđ#̩͑0;H]u搂@:~וKL Nsh}OIR*8:2 !lDJVo(3=M(zȰ+i*NAr6KnSl)!JJӁ* %݉?|D}d5:eP0R;{$X'xF@.ÊB {,WJuQɲRI;9QE琯62fT.DUJ;*cP A\ILNj!J۱+O\͔]ޒS߼Jȧc%ANolՎprULZԛerE2=XDXgVQeӓk y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