o
    ¤ó·i>  ã                   @   s6   d dl m Z mZmZ dd„ Zde f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.htmlN)Ú
astimezoner   Úutc©Údt© r	   úcC:\Users\psant\Downloads\PAF backend\school\venv\Lib\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)ÚfoldN)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.TFN)Ú
isinstancer   r   r   r	   r	   r
   Úvalid_datetime   s   r   N)r   r   r   r   r   r   r	   r	   r	   r
   Ú<module>   s    	