![]() Server : Apache/2.4.52 (Ubuntu) System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 User : www-data ( 33) PHP Version : 8.1.2-1ubuntu2.21 Disable Function : NONE Directory : /lib/python3/dist-packages/cloudinit/analyze/__pycache__/ |
o }��f� � @ s� d dl Z d dlZd dlmZmZ d dlmZmZmZ ddddddd d d�ZdZ d Z dZdd� Zdd� Z dd� Zdd� Zddd�Zdd� ZedkrOee� � dS dS )� N)�datetime�timezone)� atomic_helper�subp�utilzfinished running cloud-initz%starting search for local datasourcesz!searching for network datasourceszrunning config moduleszfinalizing moduleszrunning modules forzrunning single module )�finishedz init-local�init-network�initzmodules-configz modules-final�modules�singlez%Y-%m-%d %H:%M:%S,%fz%b %d %H:%M:%S.%f %Yz%b %d %H:%M:%S %Yc C s� dd� t dd�D �}| �� d |v r6t}d| v rt}t�| d tt�� j� |�j t jd�}|�� }t|�S d | v rMt�| t �j t jd�}|�� }t|�S t| �}t|�S ) Nc S s g | ]}t j| �qS � )�calendar� month_abbr)�.0�mr r �8/usr/lib/python3/dist-packages/cloudinit/analyze/dump.py� <listcomp> s z#parse_timestamp.<locals>.<listcomp>� � r �.� )�tzinfo�,)�range�split�DEFAULT_FMT�CLOUD_INIT_JOURNALCTL_FMTr �strptime�str�now�year�replacer �utc� timestamp�CLOUD_INIT_ASCTIME_FMT�parse_timestamp_from_date�float)�timestampstr�months�FMT�dtr# r r r �parse_timestamp s* �����r+ c C s dt � ddg�jv S )z�GNU date includes a string containing the word GNU in it in help output. Posix date does not. Use this to indicate on Linux systems without GNU date that the extended parsing is not available. �GNU�datez--help)r �stdoutr r r r �has_gnu_date9 s r/ c C sR t �� st�d�rd}nt� rd}ntd| � d���tt�|ddd| g�j�� �S )N�gdater- z-Unable to parse timestamp without GNU date: [�]z-uz+%s.%3Nz-d) r �is_Linuxr �whichr/ � ValueErrorr&