文件操作 - dump.cpython-310.pyc
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3/dist-packages/cloudinit/analyze/__pycache__/dump.cpython-310.pyc
编辑文件内容
o x[h� � @ 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&