U
    ~fhQ                     @  sp   U d Z ddlmZ ddlmZmZmZ ddlmZmZm	Z	 edZ
ded< G dd deZedd	Zded
< dS )z$Timezone related utilities for BSON.    )annotations)datetime	timedeltatzinfo)OptionalTupleUnionr   ZEROc                   @  sn   e Zd ZdZddddddZdd	d
dZdd	ddZdddddZdddddZdd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.
    zUnion[float, timedelta]strNone)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-36gvocj8/bson/tz_util.py__init__    s    
zFixedOffset.__init__zTuple[timedelta, str])r   c                 C  s   | j | jfS N)r   r   r   r   r   r   __getinitargs__'   s    zFixedOffset.__getinitargs__c                 C  s   | j j d| jd| jdS )N(z, ))	__class____name__r   r   r   r   r   r   __repr__*   s    zFixedOffset.__repr__zOptional[datetime]r   )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   tzname0   s    zFixedOffset.tznamec                 C  s   t S r   )r	   r!   r   r   r   dst3   s    zFixedOffset.dstN)
r   
__module____qualname____doc__r   r   r   r"   r#   r$   r   r   r   r   r
      s   r
   UTCutcN)r'   
__future__r   r   r   r   typingr   r   r   r	   __annotations__r
   r)   r   r   r   r   <module>   s   