U
    d                     @   sd   U d Z ddlmZmZmZ ddlmZmZmZ edZee	d< G dd deZ
e
ddZe
e	d< d	S )
z$Timezone related utilities for BSON.    )datetime	timedeltatzinfo)OptionalTupleUnionZEROc                   @   s|   e Zd ZdZeeef eddddZe	eef dddZ
ee ed	d
dZee ed	ddZee ed	ddZdS )FixedOffsetzFixed offset timezone, in minutes east from UTC.

    Implementation based from the Python `standard library documentation
    <http://docs.python.org/library/datetime.html#tzinfo-objects>`_.
    Defining __getinitargs__ enables pickling / copying.
    N)offsetnamereturnc                 C   s(   t |tr|| _nt|d| _|| _d S )N)minutes)
isinstancer   _FixedOffset__offset_FixedOffset__name)selfr
   r    r   0/tmp/pip-unpacked-wheel-oblwsawz/bson/tz_util.py__init__   s    
zFixedOffset.__init__)r   c                 C   s   | j | jfS N)r   r   )r   r   r   r   __getinitargs__&   s    zFixedOffset.__getinitargs__)dtr   c                 C   s   | j S r   )r   r   r   r   r   r   	utcoffset)   s    zFixedOffset.utcoffsetc                 C   s   | j S r   )r   r   r   r   r   tzname,   s    zFixedOffset.tznamec                 C   s   t S r   )r   r   r   r   r   dst/   s    zFixedOffset.dst)__name__
__module____qualname____doc__r   floatr   strr   r   r   r   r   r   r   r   r   r   r   r   r	      s   r	   UTCutcN)r   r   r   r   typingr   r   r   r   __annotations__r	   r#   r   r   r   r   <module>   s   