Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/keystoneauth1/__pycache__/_utils.cpython-39.pyc
Ðазад
a s�h� � @ s� d dl Z d dlZd dlZd dlZeejd�dd�Zee�Z e j e j d�dd�Z ee j d�d d �Zdeje ef eje ef eje ef eje ef eje ef eje ef eje ef e j d�dd �Zdeje ef eje ef eje ef eje ef eje ef eje ef eje ef e j d�dd�Zz>ed�� Zde�� �� v ZW d � n1 �s^0 Y W n e�y� dZY n0 dS )� N)�name�returnc C s | � t�d�d d�} t�| �S )N�.r Zkeystoneauth)�replace�__name__�split�logging� getLogger)r � r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/keystoneauth1/_utils.py� get_logger s r )� timestampr c C s$ | � � }|du r| S | jdd�| S )z9Normalize time in arbitrary timezone to UTC naive object.N��tzinfo)� utcoffsetr )r �offsetr r r �normalize_time s r )�timestrr c C sr zt �| �W S t jy> } ztt|���W Y d}~n8d}~0 tyl } ztt|���W Y d}~n d}~0 0 dS )z Parse time from ISO 8601 format.N)�iso8601Z parse_dateZ ParseError� ValueError�str� TypeError)r �er r r � parse_isotime$ s r )�days�seconds�microseconds�milliseconds�minutes�hours�weeksr c C s6 t j �t jj�jdd�}t �| ||||||�}|| S )a! Calculate the time in the future from utcnow. :param days: Days to add to timestamp. :param seconds: Seconds to add to timestamp. :param microseconds: Microseconds to add to timestamp. :param milliseconds: Milliseconds to add to timestamp. :param minutes: Minutes to add to timestamp. :param hours: Hours to add to timestamp. :param weeks: Weeks to add to timestamp. :returns: The time in the future based on ``timedelta_kwargs`` and in TZ-naive format. :rtype: datetime.datetime Nr ��datetime�now�timezone�utcr � timedelta� r r r r r r r r# �deltar r r �from_utcnow. s �r) c C s6 t j �t jj�jdd�}t �| ||||||�}|| S )a@ Calculate the time in the past from utcnow. :param days: Days to remove from timestamp. :param seconds: Seconds to remove from timestamp. :param microseconds: Microseconds to remove from timestamp. :param milliseconds: Milliseconds to remove from timestamp. :param minutes: Minutes to remove from timestamp. :param hours: Hours to remove from timestamp. :param weeks: Weeks to remove from timestamp. :returns: The time in the past based on ``timedelta_kwargs`` and in TZ-naive format. :rtype: datetime.datetime Nr r! r'