a
    Dųg  ć                   @   s(   d dl Z d dlmZ dd Zdd ZdS )é    N)Śtimezonec                 C   s(   t  | ”rt  | ” d”S |  d”S dS )a¢  
    Helper function to translate a possibly-timezone-aware datetime into the format used in the
    go_live_at / expire_at form fields - "YYYY-MM-DD hh:mm", with no timezone indicator.
    This will be interpreted as being in the server's timezone (settings.TIME_ZONE), so we
    need to pass it through timezone.localtime to ensure that the client and server are in
    agreement about what the timestamp means.
    z%Y-%m-%d %H:%MN)r   Zis_awareŚ	localtimeŚstrftime)Ś	timestamp© r   ś\/var/www/lab.imftr.de/x/nb_venv/lib/python3.9/site-packages/wagtail/test/utils/timestamps.pyŚsubmittable_timestamp   s    
r   c                  G   s   t j |  }t |”S )N)Śdatetimer   Z
make_aware)ŚargsŚdtr   r   r   Ślocal_datetime   s    
r   )r	   Zdjango.utilsr   r   r   r   r   r   r   Ś<module>   s   