403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.14
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /snap/certbot/current/lib/python3.12/site-packages/pyrfc3339/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /snap/certbot/current/lib/python3.12/site-packages/pyrfc3339/__pycache__/generator.cpython-312.pyc
�

N�g��� �ddlZddlmZdd�Zy)�N)�format_timezonec� �|j�I|dur:|dur+|jtjj��}ntd��td��|dur)|j
tjj�}|jd�}|dur||jd�z
}|jtjjur|dz
}|S|t|jj|�j��z
}|S)aj
    Generate an :RFC:`3339`-formatted timestamp from a
    :class:`datetime.datetime`.

    >>> from datetime import datetime, timezone
    >>> from zoneinfo import ZoneInfo
    >>> generate(datetime(2009, 1, 1, 12, 59, 59, 0, timezone.utc))
    '2009-01-01T12:59:59Z'

    The timestamp will use UTC unless `utc=False` is specified, in which case
    it will use the timezone from the :class:`datetime.datetime`'s
    :attr:`tzinfo` parameter.

    >>> eastern = ZoneInfo('US/Eastern')
    >>> dt = datetime(2009, 1, 1, 12, 59, 59, tzinfo=eastern)
    >>> generate(dt)
    '2009-01-01T17:59:59Z'
    >>> generate(dt, utc=False)
    '2009-01-01T12:59:59-05:00'

    Unless `accept_naive=True` is specified, the `datetime` must not be naive.

    >>> generate(datetime(2009, 1, 1, 12, 59, 59, 0))
    Traceback (most recent call last):
    ...
    ValueError: naive datetime and accept_naive is False

    >>> generate(datetime(2009, 1, 1, 12, 59, 59, 0), accept_naive=True)
    '2009-01-01T12:59:59Z'

    If `accept_naive=True` is specified, the `datetime` is assumed to be UTC.
    Attempting to generate a local timestamp from a naive datetime will result
    in an error.

    >>> generate(datetime(2009, 1, 1, 12, 59, 59, 0), accept_naive=True, utc=False)
    Traceback (most recent call last):
    ...
    ValueError: cannot generate a local timestamp from a naive datetime

    T)�tzinfoz7cannot generate a local timestamp from a naive datetimez(naive datetime and accept_naive is Falsez%Y-%m-%dT%H:%M:%Sz.%f�Z)r�replace�datetime�timezone�utc�
ValueError�
astimezone�strftimer�	utcoffset�
total_seconds)�dtr
�accept_naive�microseconds�	timestamps     ��/build/snapcraft-certbot-2c33630aaf29c47357e5a1683f659d3d/parts/certbot/install/lib/python3.12/site-packages/pyrfc3339/generator.py�generaters���T
�y�y���4���d�{��Z�Z�x�'8�'8�'<�'<�Z�=�� �M����G�H�H�
�d�{�
�]�]�8�,�,�0�0�
1�����/�0�I��t���R�[�[��'�'�	�	�y�y�H�%�%�)�)�)��S��	���	�_�R�Y�Y�%8�%8��%<�%J�%J�%L�M�M�	���)TFF)r�pyrfc3339.utilsrr�rr�<module>rs���+�@r

Youez - 2016 - github.com/yon3zu
LinuXploit