a
    còf>  ã                   @   s6   d dl m Z mZmZ dd„ Ze dœdd„Zdd„ Zd	S )
é    )ÚdatetimeÚtimezoneÚtzinfoc                 C   s   |   tj¡| kS )zmCheck if a datetime exists. Taken from: https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html)Ú
astimezoner   Úutc©Údt© r	   úZ/home/httpd/docs/test/DocsMgr/lib/python3.9/site-packages/rest_framework/utils/timezone.pyÚdatetime_exists   s    r   r   c                 C   s$   t | ƒo"| j| j d� ¡ |  ¡ kS )zxCheck whether a datetime is ambiguous. Taken from: https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html)Úfold)r   Úreplacer   Ú	utcoffsetr   r	   r	   r
   Údatetime_ambiguous   s    ÿr   c                 C   s   t | jtƒrt| ƒsdS dS )zLReturns True if the datetime is not ambiguous or imaginary, False otherwise.TF)Ú
isinstancer   r   r   r	   r	   r
   Úvalid_datetime   s    r   N)r   r   r   r   r   r   r	   r	   r	   r
   Ú<module>   s   	