Ë
    Æº[Q  ã                   óN   — d dl mZ d dlmZmZ d dlmZ  G d„ de«      Zd„ Zd„ Z	y)	é    )Údivision)Ú	timedeltaÚtzinfo)Údeepcopyc                   ó4   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	y)	Ú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                 óÒ   — t        j                  | «       |dk  rt        d«      ‚|dk  r|dz  }t        ||¬«      | _        dt        t        | j                  «      «      z   | _        y)zK
        Create a new FixedOffset instance with the given offset.

        r   zminutes must not be negativeéÿÿÿÿ)ÚhoursÚminutesÚUTCN)r   Ú__init__Ú
ValueErrorr   Ú_FixedOffset__offsetÚtimezoneÚtimedelta_secondsÚ_FixedOffset__name)Úselfr   r   s      ú1/usr/lib/python3/dist-packages/pyrfc3339/utils.pyr   zFixedOffset.__init__(   s_   € ô
 	�‰˜ÔØ�QŠ;ÜÐ;Ó<Ð<Ø�1Š9Ø�r‰MˆGÜ!¨Ø*1ô3ˆŒàœhÔ'8¸¿¹Ó'GÓHÑHˆ�ó    c                 ó   — t        d«      S )zG
        Return offset for DST.  Always returns timedelta(0).

        r   )r   ©r   Údts     r   ÚdstzFixedOffset.dst6   s   € ô
 ˜‹|Ðr   c                 ó   — | j                   S )z*
        Return offset from UTC.

        )r   r   s     r   Ú	utcoffsetzFixedOffset.utcoffset=   s   € ð
 �}‰}Ðr   c                 ó   — | j                   S )z+
        Return name of timezone.

        )r   r   s     r   ÚtznamezFixedOffset.tznameD   s   € ð
 �{‰{Ðr   c                 óB   — dj                  | j                  d «      «      S )Nz<{0}>)Úformatr   )r   s    r   Ú__repr__zFixedOffset.__repr__K   s   € Ø�~‰~˜dŸk™k¨$Ó/Ó0Ð0r   c           	      óÎ   — | j                   }|j                  |«      }||t        | «      <   | j                  j	                  «       D ]  \  }}t        ||t        ||«      «       Œ |S )N)Ú	__class__Ú__new__ÚidÚ__dict__ÚitemsÚsetattrr   )r   ÚmemoÚclsÚresultÚkÚvs         r   Ú__deepcopy__zFixedOffset.__deepcopy__N   s^   € Ø�n‰nˆØ—‘˜SÓ!ˆØˆŒR�‹X‰Ø—M‘M×'Ñ'Ó)ò 	2‰DˆAˆqÜ�F˜Aœx¨¨4Ó0Õ1ð	2àˆr   N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r!   r.   © r   r   r   r      s'   „ ñò@Iòòòò1ór   r   c                 óî   — 	 t        t        | j                  «       «      «      S # t        $ rG | j                  }| j
                  }| j                  }t        t        |dz  |z   |dz  z   «      «      cY S w xY w)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€Q i@B )ÚintÚroundÚtotal_secondsÚAttributeErrorÚdaysÚsecondsÚmicroseconds)Útdr9   r:   r;   s       r   r   r   W   sp   € ð2OÜ”5˜×)Ñ)Ó+Ó,Ó-Ð-øÜò OØ�w‰wˆØ—*‘*ˆØ—‘ˆä”5˜$ ™,¨'Ñ1°\ÀGÑ5KÑLÓMÓNÒNðOús   ‚!$ ¤AA4Á3A4c                 ó¾   — t        t        | «      d«      \  }}t        t        |«      dz  «      }| dk\  rd}nd}dj	                  |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   )r   r   r:   r   Úsigns        r   r   r   z   sY   € ô œC 	›N¨DÓ1�N€Eˆ7Ü”E˜'“N RÑ'Ó(€Gà�A‚~Ø‰àˆØ×&Ñ& t¬S°«Z¼¸W»ÓFÐFr   N)
Ú
__future__r   Údatetimer   r   Úcopyr   r   r   r   r3   r   r   ú<module>rH      s*   ðÝ ç &Ý ôM�&ô Mò` OóFGr   