a
    Cg>                     @   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	   \/var/www/lab.imftr.de/x/nb_venv/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   	